about summary refs log tree commit diff
path: root/e2e-tests/tools/checksum.scm
diff options
context:
space:
mode:
authorArun Isaac2025-08-28 20:09:50 +0100
committerArun Isaac2025-11-16 22:42:59 +0000
commit767f80e7296c41a4428c73cadc90b953d252f8d7 (patch)
treece32736718146b2c01dd27c5627503786f33b505 /e2e-tests/tools/checksum.scm
parent8b4d0320cbc2f07c9040aee7b6e7e4fb1fe08a91 (diff)
downloadravanan-767f80e7296c41a4428c73cadc90b953d252f8d7.tar.gz
ravanan-767f80e7296c41a4428c73cadc90b953d252f8d7.tar.lz
ravanan-767f80e7296c41a4428c73cadc90b953d252f8d7.zip
e2e-tests: Add tests based off of examples in the ccwl manual.
Diffstat (limited to 'e2e-tests/tools/checksum.scm')
-rw-r--r--e2e-tests/tools/checksum.scm22
1 files changed, 22 insertions, 0 deletions
diff --git a/e2e-tests/tools/checksum.scm b/e2e-tests/tools/checksum.scm
new file mode 100644
index 0000000..27dec78
--- /dev/null
+++ b/e2e-tests/tools/checksum.scm
@@ -0,0 +1,22 @@
+(define md5sum
+  (command #:inputs (file #:type File #:stage? #t)
+           #:run "md5sum" "$(inputs.file.basename)"
+           #:outputs (md5 #:type stdout)
+           #:stdout "md5"))
+
+(define sha1sum
+  (command #:inputs (file #:type File #:stage? #t)
+           #:run "sha1sum" "$(inputs.file.basename)"
+           #:outputs (sha1 #:type stdout)
+           #:stdout "sha1"))
+
+(define sha256sum
+  (command #:inputs (file #:type File #:stage? #t)
+           #:run "sha256sum" "$(inputs.file.basename)"
+           #:outputs (sha256 #:type stdout)
+           #:stdout "sha256"))
+
+(workflow ((file #:type File))
+  (tee (md5sum #:file file)
+       (sha1sum #:file file)
+       (sha256sum #:file file)))