]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: run oids test only when uuidgen tool was built
authorThomas Deutschmann <whissi@gentoo.org>
Sun, 11 Nov 2018 01:17:55 +0000 (02:17 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 4 Jan 2019 10:13:06 +0000 (11:13 +0100)
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.

tests/ts/uuid/oids

index 3b005c5b2aaaf331aee6cade1f3d81c0924fe96c..77e010c1daba6fd5fcfcd98be06fada563086db1 100755 (executable)
@@ -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