You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2018/11/08 17:01:26 UTC

kudu git commit: [cmake] no empty KUDU_DATA_FILES ctest env variables

Repository: kudu
Updated Branches:
  refs/heads/master c5665046c -> 3906d94a4


[cmake] no empty KUDU_DATA_FILES ctest env variables

This patch introduces an update on ADD_KUDU_TEST() custom function:
if DATA_FILES is not specified for a test, don't add KUDU_DATA_FILES
variable into its ctest environment.

Prior to this patch, ctest environment of every test binary would
contain KUDU_DATA_FILES variable.  If DATA_FILES was specified for a
test, it was set to corresponding value, otherwise it was set to
an empty string.

Change-Id: I2b255f6148649cd282bab70fb19c3321fec01adb
Reviewed-on: http://gerrit.cloudera.org:8080/11907
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/3906d94a
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/3906d94a
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/3906d94a

Branch: refs/heads/master
Commit: 3906d94a462b9a5b6af50010c48f5a23de54477c
Parents: c566504
Author: Alexey Serbin <al...@apache.org>
Authored: Wed Nov 7 15:52:07 2018 -0800
Committer: Alexey Serbin <as...@cloudera.com>
Committed: Thu Nov 8 16:52:12 2018 +0000

----------------------------------------------------------------------
 CMakeLists.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/3906d94a/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b34867..ce6d943 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -874,8 +874,10 @@ function(ADD_KUDU_TEST REL_TEST_NAME)
     # The only way we can pass information to dist-test is through the environment.
     # So, use a comma-delimited environment variable to pass the list of data files
     # that need to be uploaded.
-    string(REPLACE ";" "," DATA_FILES_ENV "${DATA_FILES_LIST}")
-    list(APPEND CUR_TEST_ENV "KUDU_DATA_FILES=${DATA_FILES_ENV}")
+    if(DATA_FILES_LIST)
+      string(REPLACE ";" "," DATA_FILES_ENV "${DATA_FILES_LIST}")
+      list(APPEND CUR_TEST_ENV "KUDU_DATA_FILES=${DATA_FILES_ENV}")
+    endif()
 
     set_tests_properties(${TARGET} PROPERTIES
       TIMEOUT ${EXTENDED_TIMEOUT}