aboutsummaryrefslogtreecommitdiff
path: root/gen.py
diff options
context:
space:
mode:
authorJosh Spicer <josh@joshspicer.com>2022-05-13 03:07:22 +0300
committerGitHub <noreply@github.com>2022-05-13 03:07:22 +0300
commit5332b952adf7e31a744bba297b5232a7000de58a (patch)
tree4779f859439df52d82e2effeaba0b075d83add54 /gen.py
parent3e7c0308db4005644b21c0626ba6239271cf04cc (diff)
add feature stubs for all
Diffstat (limited to 'gen.py')
-rwxr-xr-xgen.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/gen.py b/gen.py
new file mode 100755
index 0000000..ee4aea4
--- /dev/null
+++ b/gen.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+
+import os
+
+featureDirs = os.listdir('./src')
+
+
+count = len(featureDirs)
+
+for fDir in featureDirs:
+ if os.path.isdir('./test/' + fDir):
+ print('already exists: ', fDir)
+ continue
+
+ os.mkdir('./test/' + fDir)
+ f = open(f'./test/{fDir}/test.sh', 'w')
+
+ contents = f"""
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" {fDir} --version
+
+ # Report result
+ reportResults"""
+
+ f.write(contents)