tests: replace xargs workaround with bash array expansion
[babeltrace.git] / tests / plugins / src.ctf.fs / succeed / test_succeed
index 9cd77ba9d2ab76f28428c5c2db983e2d129ce381..4b4387856c8d87de28168a7e535f1bb8d7cc9c84 100755 (executable)
@@ -38,7 +38,7 @@ this_dir_build="$BT_TESTS_BUILDDIR/$this_dir_relative"
 succeed_trace_dir="$BT_CTF_TRACES_PATH/succeed"
 expect_dir="$BT_TESTS_DATADIR/$this_dir_relative"
 
-test_ctf_common_details_args="-p with-trace-name=no,with-stream-name=no"
+test_ctf_common_details_args=("-p" "with-trace-name=no,with-stream-name=no")
 
 test_ctf_gen_single() {
        name="$1"
@@ -46,15 +46,15 @@ test_ctf_gen_single() {
        diag "Generating trace '$name'"
        bt_diff_details_ctf_gen_single "$this_dir_build/gen-trace-$name" \
                "$expect_dir/trace-$name.expect" \
-               "$test_ctf_common_details_args -p with-uuid=no"
+               "${test_ctf_common_details_args[@]}" "-p" "with-uuid=no"
        ok $? "Generated trace '$name' gives the expected output"
 }
 
 test_ctf_single() {
        name="$1"
 
-       bt_diff_details_ctf_single "$succeed_trace_dir/$name" \
-               "$expect_dir/trace-$name.expect" "$test_ctf_common_details_args"
+       bt_diff_details_ctf_single "$expect_dir/trace-$name.expect" \
+               "$succeed_trace_dir/$name" "${test_ctf_common_details_args[@]}"
        ok $? "Trace '$name' gives the expected output"
 }
 
This page took 0.02315 seconds and 4 git commands to generate.