summaryrefslogtreecommitdiff
path: root/tests/SConscript
diff options
context:
space:
mode:
authorClaudius Holeksa <mail@keldu.de>2023-06-10 17:21:29 +0200
committerClaudius Holeksa <mail@keldu.de>2023-06-10 17:21:29 +0200
commit6c8e3d1786a5de4ae562c03693b8dad9dd0ab26e (patch)
tree18275240cfb8ff30e1d383ea351a277e894e988f /tests/SConscript
parentb670001ca80dbc0e1a51b4a08776eb41dabc2a9e (diff)
tests,c++: Intermediate commit preparing testing and json
Diffstat (limited to 'tests/SConscript')
-rw-r--r--tests/SConscript32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/SConscript b/tests/SConscript
new file mode 100644
index 0000000..3659c0b
--- /dev/null
+++ b/tests/SConscript
@@ -0,0 +1,32 @@
+#!/bin/false
+
+import os
+import os.path
+import glob
+
+
+Import('env')
+
+dir_path = Dir('.').abspath
+
+# Environment for base library
+test_cases_env = env.Clone();
+
+test_cases_env.sources = sorted(glob.glob(dir_path + "/*.cpp"))
+test_cases_env.headers = sorted(glob.glob(dir_path + "/*.h"))
+
+env.sources += test_cases_env.sources;
+env.headers += test_cases_env.headers;
+
+objects_static = []
+test_cases_env.add_source_files(objects_static, test_cases_env.sources, shared=False);
+test_cases_env.program = test_cases_env.Program('#bin/tests', objects_static);
+
+# Set Alias
+env.Alias('test', test_cases_env.program);
+env.Alias('check', test_cases_env.program);
+
+env.targets += ['test'];
+
+# Install
+env.Install('$prefix/bin/', [test_cases_env.program]);