resource: Install unit tests 83/24483/6
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Fri, 23 Mar 2018 10:45:14 +0000 (11:45 +0100)
committerMats Wichmann <mats@linux.com>
Sat, 7 Apr 2018 14:13:06 +0000 (14:13 +0000)
logger tests are renamed to more meaningful names,
note that yocto used different names (logger_test_c/cpp),
I aligned to upstream's sources.

Bug: https://jira.iotivity.org/browse/IOT-524
Origin: https://gerrit.iotivity.org/gerrit/#/c/24483/
Change-Id: Ib5eabdece4414801cd08d27671bb759d27914174
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
resource/c_common/ocrandom/test/SConscript
resource/oc_logger/examples/SConscript
resource/unittests/SConscript

index f874ea6..eb253e0 100644 (file)
@@ -59,3 +59,5 @@ if randomtest_env.get('TEST') == '1':
     if target_os in ['linux', 'windows']:
         run_test(randomtest_env, 'resource_csdk_random_test.memcheck',
                  'resource/c_common/ocrandom/test/randomtests')
+randomtest_env.UserInstallTargetExtra(randomtests, 'tests/resource/c_common/ocrandom/')
+
index ae09552..48dea2b 100644 (file)
@@ -54,9 +54,10 @@ else:
 ######################################################################
 # Source files and Targets
 ######################################################################
-examples_c = examples_env.Program(
-    'examples_c', 'test_logging.c', OBJPREFIX='c_')
-examples_cpp = examples_env.Program('examples_cpp', 'test_logging.cpp')
+examples = []
+examples += examples_env.Program('test_logging_c', 'test_logging.c', OBJPREFIX='c_')
+examples += examples_env.Program('test_logging_cpp', 'test_logging.cpp')
 
-Alias('liboc_logger_examples', [examples_c, examples_cpp])
+Alias('liboc_logger_examples', examples)
 examples_env.AppendTarget('liboc_logger_examples')
+examples_env.UserInstallTargetExtra(examples)
index 1ccfccd..19b649a 100644 (file)
@@ -119,16 +119,18 @@ if (('SUB' in with_mq) or ('PUB' in with_mq) or ('BROKER' in with_mq)):
 if unittests_env.get('WITH_CLOUD'):
     unittests_src = unittests_src + ['OCAccountManagerTest.cpp']
 
-unittests = unittests_env.Program('unittests', unittests_src)
+unittests = [unittests_env.Program('unittests', unittests_src)]
 
-Alias("unittests", [unittests])
+Alias("unittests", unittests)
 
 unittests_env.AppendTarget('unittests')
 if unittests_env.get('TEST') == '1':
     if target_os in ['windows']:
         unittests_env.AppendENVPath('PATH', unittests_env.get('BUILD_DIR'))
     if target_os in ['linux', 'windows']:
-        run_test(unittests_env, 
+        run_test(unittests_env,
                  'resource_unittests_unittests.memcheck',
-                 'resource/unittests/unittests', 
+                 'resource/unittests/unittests',
                  unittests)
+unittests_env.UserInstallTargetExtra(unittests, 'tests/resource/')
+