Skip to content

Commit 691e2f0

Browse files
committed
Update tests to use dynamic results file name
So that we run tests in parallel
1 parent 775d561 commit 691e2f0

35 files changed

Lines changed: 39 additions & 39 deletions

tests/API/XCCDF/unittests/test_xccdf_results_arf_asset.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -o pipefail
77

88
function test_xccdf_results_arf_asset {
99
local DS="${srcdir}/test_xccdf_results_arf_no_oval.xccdf.xml"
10-
local result="results.xml"
10+
local result="$(mktemp results.XXXXXXX.xml)"
1111
local stderr="error.log"
1212

1313
[ -f $result ] && rm -f $result

tests/curl/test_curl_encoding.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function curl_accept_encoding {
99
require_internet || return 255
1010

1111
local DF="${srcdir}/ds.xml"
12-
local RF="results.xml"
12+
local RF="$(mktemp results.XXXXXXX.xml)"
1313
local LOG="verbose.log"
1414

1515
$OSCAP xccdf --verbose=DEVEL eval --fetch-remote-resources --results $RF $DF 2>$LOG || echo "OK"

tests/probes/family/test_probes_family.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function test_probes_family {
2222

2323
local ret_val=0;
2424
local DF="${srcdir}/test_probes_family.xml"
25-
local RF="results.xml"
25+
local RF="$(mktemp results.XXXXXXX.xml)"
2626

2727
[ -f $RF ] && rm -f $RF
2828

tests/probes/file/test_probes_file.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function test_probes_file {
2222

2323
local ret_val=0;
2424
local DF="$srcdir/test_probes_file.xml"
25-
local RF="results.xml"
25+
local RF="$(mktemp results.XXXXXXX.xml)"
2626

2727
[ -f $RF ] && rm -f $RF
2828

@@ -50,7 +50,7 @@ function test_probes_file_filenames {
5050

5151
local ret_val=0
5252
local DF="$srcdir/test_probes_file_filename.xml"
53-
result="results.xml"
53+
result="$(mktemp results.XXXXXXX.xml)"
5454
files_dir=$(mktemp -d)
5555
DF_INJECTED=$(mktemp)
5656

@@ -95,7 +95,7 @@ function test_probes_file_invalid_utf8 {
9595

9696
local ret_val=0
9797
local DF="$srcdir/test_probes_file_filename.xml"
98-
result="results.xml"
98+
result="$(mktemp results.XXXXXXX.xml)"
9999
files_dir=$(mktemp -d)
100100
DF_INJECTED=$(mktemp)
101101

tests/probes/file/test_probes_file_behaviour.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function test_probes_file_behaviour {
4040

4141
local ret_val=0
4242
local DF="$srcdir/test_probes_file_behaviour.xml"
43-
result="results.xml"
43+
result="$(mktemp results.XXXXXXX.xml)"
4444

4545
test_probes_behaviour_setup
4646

tests/probes/fileextendedattribute/test_probes_fileextendedattribute.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function test_probes_fileextendedattribute {
1212

1313
local ret_val=0;
1414
local DEFFILE="$srcdir/test_probes_fileextendedattribute.xml"
15-
local RESFILE="results.xml"
15+
local RESFILE="$(mktemp results.XXXXXXX.xml)"
1616

1717
[ -f $RESFILE ] && rm -f $RESFILE
1818

tests/probes/filehash/test_probes_filehash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function test_probes_filehash {
2424

2525
local ret_val=0;
2626
local DF="test_probes_filehash.xml"
27-
local RF="results.xml"
27+
local RF="$(mktemp results.XXXXXXX.xml)"
2828

2929
[ -f $RF ] && rm -f $RF
3030

tests/probes/filehash58/test_probes_filehash58.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function test_probes_filehash58_old_algos {
2424

2525
local ret_val=0;
2626
local DF="test_probes_filehash58_old_algos.xml"
27-
local RF="results.xml"
27+
local RF="$(mktemp results.XXXXXXX.xml)"
2828

2929
[ -f $RF ] && rm -f $RF
3030

@@ -52,7 +52,7 @@ function test_probes_filehash58_new_algos {
5252

5353
local ret_val=0
5454
local DF="test_probes_filehash58_new_algos.xml"
55-
local RF="results.xml"
55+
local RF="$(mktemp results.XXXXXXX.xml)"
5656

5757
[ -f $RF ] && rm -f $RF
5858

tests/probes/filemd5/test_probes_filemd5.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function test_probes_filemd5 {
2323

2424
local ret_val=0;
2525
local DEFFILE="test_probes_filemd5.xml"
26-
local RESFILE="results.xml"
26+
local RESFILE="$(mktemp results.XXXXXXX.xml)"
2727

2828
[ -f $RESFILE ] && rm -f $RESFILE
2929

tests/probes/fwupdsecattr/test_probes_fwupdsecattr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function test_probes_fwupdsecattr {
1616

1717
local ret_val=0
1818
local DF="${srcdir}/test_probes_fwupdsecattr.xml"
19-
local RF="results.xml"
19+
local RF="$(mktemp results.XXXXXXX.xml)"
2020

2121
[ -f $RF ] && rm -f $RF
2222

0 commit comments

Comments
 (0)