summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Deutschmann2018-11-11 02:17:55 +0100
committerThomas Deutschmann2018-11-11 02:18:25 +0100
commit8f93c8c71d264e90bdcecf98c9ac372bbcdc53aa (patch)
tree66123855d450a4fb52604963630746ffc6e0264b
parentrtcwake: use poweroff if shutdown is not found (diff)
downloadkernel-qcow2-util-linux-8f93c8c71d264e90bdcecf98c9ac372bbcdc53aa.tar.gz
kernel-qcow2-util-linux-8f93c8c71d264e90bdcecf98c9ac372bbcdc53aa.tar.xz
kernel-qcow2-util-linux-8f93c8c71d264e90bdcecf98c9ac372bbcdc53aa.zip
tests: run oids test only when uuidgen tool was built
oids test did not check if uuidgen was available. oids test was also calling uuidgen from PATH which could result in wrong results if uuidgen from a previous util-linux installation was used. With this commit we will check if uuidgen was built and make sure that we only call the uuidgen binary we just built. If uuidgen is not available we will skip this test.
-rwxr-xr-xtests/ts/uuid/oids10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/ts/uuid/oids b/tests/ts/uuid/oids
index 3b005c5b2..77e010c1d 100755
--- a/tests/ts/uuid/oids
+++ b/tests/ts/uuid/oids
@@ -20,12 +20,14 @@ ts_init "$*"
: . > $TS_OUTPUT
-uuidgen --md5 --namespace @dns --name "www.widgets.com" >> $TS_OUTPUT
+ts_check_test_command "$TS_CMD_UUIDGEN"
-uuidgen --md5 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
+$TS_CMD_UUIDGEN --md5 --namespace @dns --name "www.widgets.com" >> $TS_OUTPUT
-uuidgen --sha1 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
+$TS_CMD_UUIDGEN --md5 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
-uuidgen --sha1 --namespace @oid --hex --name "525400fc0f5e" >> $TS_OUTPUT
+$TS_CMD_UUIDGEN --sha1 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
+
+$TS_CMD_UUIDGEN --sha1 --namespace @oid --hex --name "525400fc0f5e" >> $TS_OUTPUT
ts_finalize