Skip to content

Commit 86266e1

Browse files
committed
Switch test scripts to #!/usr/bin/env
This improves test portability, as not all systems place bash in /bin and therefore could not run the test scripts. Also update process58 test script (Test #149) to deal with this change. The test used regex that relied on /bin/bash being in the command line of the processes it was monitoring. As a result, switching to /usr/bin/env bash requires it to be updated appropriately.
1 parent 86b007b commit 86266e1

File tree

192 files changed

+198
-197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+198
-197
lines changed

release_tools/move-milestones.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python3
1+
#!/usr/bin/env python3
22

33
import argparse as ap
44

release_tools/query-milestones.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python3
1+
#!/usr/bin/env python3
22

33
import argparse as ap
44

schemas/build_schematron.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Prerequisities
44
#

schemas/refresh.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Fetches schema and schematron files from remote locations.
44
# Currently supports only Schematron for XCCDF.

tests/API/CPE/inbuilt/all.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Copyright 2013 Red Hat Inc., Durham, North Carolina.
44
# All Rights Reserved.

tests/API/OVAL/report_variable_values/all.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Check that variables have their values recorded in the OVAL results.
44
# This test verifies that different flavours of variable which are

tests/API/OVAL/unittests/all.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
. $builddir/tests/test_common.sh
44

tests/API/OVAL/unittests/test_anyxml.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#! /usr/bin/env bash
22

33
result=`mktemp`
44
xpath="$XPATH"

tests/API/OVAL/unittests/test_applicability_check.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#! /usr/bin/env bash
22

33
result=`mktemp`
44
xpath="$XPATH"

tests/API/OVAL/unittests/test_cim_datetime.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
result=`mktemp`
44

tests/API/OVAL/unittests/test_comment.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
result=`mktemp`
44

tests/API/OVAL/unittests/test_count_function.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#! /usr/bin/env bash
22

33
result=`mktemp`
44

tests/API/OVAL/unittests/test_deprecated_def.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#! /usr/bin/env bash
22

33
result=`mktemp`
44
xpath="$XPATH"

tests/API/OVAL/unittests/test_directives.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Test basic usage of OVAL Directives. OVAL Directives here are used to exclude
44
# <definitions> element from the resulting OVAL Results file.

tests/API/OVAL/unittests/test_empty_filename.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#! /usr/bin/env bash
22

33
result=`mktemp`
44

tests/API/OVAL/unittests/test_envvar_insensitive_equals.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_evr_string_comparison.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_evr_string_missing_epoch.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_external_variable.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_filecontent_line.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_float_comparison.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_glob_to_regex.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#! /usr/bin/env bash
22

33
result=`mktemp`
44

tests/API/OVAL/unittests/test_int_comparison.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_invalid_regex.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
result=`mktemp`
44

tests/API/OVAL/unittests/test_ipv4_comparison.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_ipv4_subset_of.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_ipv4_super_set_of.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_ipv6_subset_of.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_ipv6_super_set_of.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_item_not_exist.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#! /usr/bin/env bash
22

33
result=`mktemp`
44
xpath="$XPATH"

tests/API/OVAL/unittests/test_object_component_type.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
stderr=`mktemp`
44

tests/API/OVAL/unittests/test_oval_empty_variable_evaluation.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_platform_version.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
result=`mktemp`
44

tests/API/OVAL/unittests/test_skip_valid.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
result=`mktemp`
44
stderr=`mktemp`

tests/API/OVAL/unittests/test_state_check_existence.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
result=`mktemp`
44

tests/API/OVAL/unittests/test_without_syschars.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
result=`mktemp`
44

tests/API/OVAL/unittests/test_xmlns_missing.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/unittests/test_xsinil_envv58_pid.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

tests/API/OVAL/validate/all.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
. $builddir/tests/test_common.sh
44

tests/API/XCCDF/applicability/test_platform_element.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e
44
set -o pipefail

tests/API/XCCDF/applicability/test_platform_inheritance.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e
44
set -o pipefail

tests/API/XCCDF/applicability/test_remediate_fix_notapplicable.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e
44
set -o pipefail

tests/API/XCCDF/applicability/test_remediate_fix_processing.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e
44
set -o pipefail

tests/API/XCCDF/applicability/test_remediate_fix_processing_ds.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e
44
set -o pipefail

tests/API/XCCDF/applicability/test_report_anaconda_fixes.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e
44
set -o pipefail

tests/API/XCCDF/unittests/all_python.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e -o pipefail

tests/API/XCCDF/unittests/test_ansible_yaml_block_scalar.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_default_selector.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_deriving_xccdf_result_from_oval.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_deriving_xccdf_result_from_oval2.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_deriving_xccdf_result_from_oval_multicheck.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_empty_variable.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_fix_arf.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_fix_filtering.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_fix_instance.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_fix_resultid_by_suffix.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_fix_script_header.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_generate_fix_ansible_vars.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_inherit_selector.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_multiple_oval_files_with_same_basename.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
touch not_executable

tests/API/XCCDF/unittests/test_oscap_common.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e -o pipefail

tests/API/XCCDF/unittests/test_oval_without_definition.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_profile_selection_by_suffix.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_remediate_perl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_remediate_python.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

tests/API/XCCDF/unittests/test_remediate_python_subs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. $builddir/tests/test_common.sh
33

44
set -e

0 commit comments

Comments
 (0)