summaryrefslogtreecommitdiffhomepage
path: root/tools/hpptest.py
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-08-14 19:15:53 +0200
committerAmlal <amlal@nekernel.org>2025-08-14 19:21:05 +0200
commit37bc0133c137cdf7fe62e79ac8208ec46096316e (patch)
treef1f52c6ec2cb021f60a8ce94e7af267b65f1e7e1 /tools/hpptest.py
parent4522b12ee7929f6ba195de9c0b3111802e8e0100 (diff)
feat: mk.test tool, test a header file with static asserts.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'tools/hpptest.py')
-rwxr-xr-xtools/hpptest.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/hpptest.py b/tools/hpptest.py
new file mode 100755
index 0000000..2cf8e9d
--- /dev/null
+++ b/tools/hpptest.py
@@ -0,0 +1,10 @@
+#! /usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+import sys, os
+
+if __name__ == '__main__':
+ if len(sys.argv) == 2:
+ os.system(f"clang++ -std=c++20 -DSOCL_HPPTEST '-DSOCL_HPPTEST_ASSERT(x)=static_assert(x, #x)' {sys.argv[1]} -o a.out && cat {sys.argv[1]}")
+ print("[TEST] HEADER COMPILATION PASSES")
+