This is an automated email from the ASF dual-hosted git repository.
phrocker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
The following commit(s) were added to refs/heads/master by this push:
new 1209f86 MINIFICPP-719: Fix bootstrap issues for sqllite and testing
1209f86 is described below
commit 1209f8615c2f68a4b5db3afcb2cd44ef1603cf78
Author: Marc Parisi <[email protected]>
AuthorDate: Wed Jan 30 08:49:15 2019 -0500
MINIFICPP-719: Fix bootstrap issues for sqllite and testing
MINIFICPP-702: Fix issue that prevents kafka from being built on
compatible platforms.
MINIFICPP-719: Fix typo on skipping tests
This closes #479.
Approved on GH by @jde64
Signed-off-by: Marc Parisi <[email protected]>
---
bootstrap.sh | 19 +++++++++++++++++++
bstrp_functions.sh | 14 ++++++++++++--
extensions/sqlite/ExecuteSQL.cpp | 2 +-
extensions/sqlite/PutSQL.cpp | 2 +-
linux.sh | 4 ++--
5 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/bootstrap.sh b/bootstrap.sh
index 3cf7128..ff3eadf 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -39,6 +39,7 @@ CMAKE_OPTIONS_ENABLED=()
CMAKE_OPTIONS_DISABLED=()
CMAKE_MIN_VERSION=()
DEPLOY_LIMITS=()
+USER_DISABLE_TESTS="${FALSE}"
DEPENDENCIES=()
@@ -51,6 +52,9 @@ while :; do
-n|--noprompt)
NO_PROMPT="true"
;;
+ -s|--skiptests)
+ USER_DISABLE_TESTS="${TRUE}"
+ ;;
-e|--enableall)
NO_PROMPT="true"
FEATURES_SELECTED="true"
@@ -264,6 +268,8 @@ add_disabled_option KAFKA_ENABLED ${FALSE}
"ENABLE_LIBRDKAFKA" "3.4.0"
add_disabled_option MQTT_ENABLED ${FALSE} "ENABLE_MQTT"
+TESTS_DISABLED=${FALSE}
+add_disabled_option SQLITE_ENABLED ${FALSE} "ENABLE_SQLITE"
# Since the following extensions have limitations on
@@ -283,6 +289,11 @@ OVERRIDE_BUILD_IDENTIFIER=${BUILD_IDENTIFIER}
load_state
+if [ "$USER_DISABLE_TESTS" == "${TRUE}" ]; then
+ ToggleFeature TESTS_DISABLED
+fi
+
+
if [ "${OVERRIDE_BUILD_IDENTIFIER}" != "${BUILD_IDENTIFIER}" ]; then
BUILD_IDENTIFIER=${OVERRIDE_BUILD_IDENTIFIER}
fi
@@ -387,6 +398,14 @@ build_cmake_command(){
CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND}
-DCMAKE_BUILD_TYPE=RelWithDebInfo"
fi
+ if [ "${TESTS_DISABLED}" = "${TRUE}" ]; then
+ CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DSKIP_TESTS=true "
+ else
+ # user may have disabled tests previously, so let's force them to be
re-enabled
+ CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DSKIP_TESTS= "
+ fi
+
+
if [ "${PORTABLE_BUILD}" = "${TRUE}" ]; then
CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DPORTABLE=ON "
else
diff --git a/bstrp_functions.sh b/bstrp_functions.sh
index be67017..9181511 100755
--- a/bstrp_functions.sh
+++ b/bstrp_functions.sh
@@ -92,6 +92,7 @@ save_state(){
echo "VERSION=1" > ${script_directory}/bt_state
echo_state_variable BUILD_IDENTIFIER
echo_state_variable BUILD_DIR
+ echo_state_variable TESTS_DISABLED
for option in "${OPTIONS[@]}" ; do
echo_state_variable $option
done
@@ -254,7 +255,13 @@ show_supported_features() {
echo "J. TensorFlow Support ..........$(print_feature_status
TENSORFLOW_ENABLED)"
echo "K. Bustache Support ............$(print_feature_status
BUSTACHE_ENABLED)"
echo "L. MQTT Support ................$(print_feature_status MQTT_ENABLED)"
- echo "M. Enable all extensions"
+ echo "M. SQLite Support ..............$(print_feature_status SQLITE_ENABLED)"
+ echo "N. Bustache Support ............$(print_feature_status
BUSTACHE_ENABLED)"
+ echo "****************************************"
+ echo " Build Options."
+ echo "****************************************"
+ echo "1. Disable Tests ...............$(print_feature_status TESTS_DISABLED)"
+ echo "2. Enable all extensions"
echo "P. Continue with these options"
if [ "$GUIDED_INSTALL" = "${TRUE}" ]; then
echo "R. Return to Main Menu"
@@ -281,7 +288,10 @@ read_feature_options(){
j) ToggleFeature TENSORFLOW_ENABLED ;;
k) ToggleFeature BUSTACHE_ENABLED ;;
l) ToggleFeature MQTT_ENABLED ;;
- m) EnableAllFeatures ;;
+ m) ToggleFeature SQLLITE_ENABLED ;;
+ n) ToggleFeature BUSTACHE_ENABLED ;;
+ 1) ToggleFeature TESTS_DISABLED ;;
+ 2) EnableAllFeatures ;;
p) FEATURES_SELECTED="true" ;;
r) if [ "$GUIDED_INSTALL" = "${TRUE}" ]; then
MENU="main"
diff --git a/extensions/sqlite/ExecuteSQL.cpp b/extensions/sqlite/ExecuteSQL.cpp
index a151bdc..51f6dee 100644
--- a/extensions/sqlite/ExecuteSQL.cpp
+++ b/extensions/sqlite/ExecuteSQL.cpp
@@ -99,7 +99,7 @@ void ExecuteSQL::onTrigger(const
std::shared_ptr<core::ProcessContext> &context,
session->read(flow_file, &cb);
} else {
// SQL is defined as a property, so get the property dynamically w/ EL
support
- context->getProperty(SQLStatement.getName(), *dynamic_sql, flow_file);
+ context->getProperty(SQLStatement, *dynamic_sql, flow_file);
}
}
diff --git a/extensions/sqlite/PutSQL.cpp b/extensions/sqlite/PutSQL.cpp
index 5c5b79d..0143bbb 100644
--- a/extensions/sqlite/PutSQL.cpp
+++ b/extensions/sqlite/PutSQL.cpp
@@ -119,7 +119,7 @@ void PutSQL::onTrigger(const
std::shared_ptr<core::ProcessContext> &context,
session->read(flow_file, &cb);
} else {
// SQL is defined as a property, so get the property dynamically w/ EL
support
- context->getProperty(SQLStatement.getName(), *sql, flow_file);
+ context->getProperty(SQLStatement, *sql, flow_file);
}
auto stmt = db->prepare(*sql);
diff --git a/linux.sh b/linux.sh
index 54730ba..90e0ba6 100644
--- a/linux.sh
+++ b/linux.sh
@@ -34,7 +34,7 @@ verify_gcc_enable(){
fi
elif [ "$feature" = "KAFKA_ENABLED" ]; then
if (( COMPILER_MAJOR >= 4 )); then
- if (( COMPILER_MAJOR > 4 || COMPILER_MINOR >= 9 )); then
+ if (( COMPILER_MAJOR > 4 || COMPILER_MINOR >= 8 )); then
echo "true"
else
echo "false"
@@ -44,7 +44,7 @@ verify_gcc_enable(){
fi
elif [ "$feature" = "PCAP_ENABLED" ]; then
if (( COMPILER_MAJOR >= 4 )); then
- if (( COMPILER_MAJOR > 4 || COMPILER_MINOR >= 9 )); then
+ if (( COMPILER_MAJOR > 4 || COMPILER_MINOR >= 8 )); then
echo "true"
else
echo "false"