|
12 | 12 | function tests_update_system() |
13 | 13 | { |
14 | 14 | local image_name="$1" |
15 | | - set -x |
| 15 | + |
16 | 16 | # Make sure that the minimum prerequisites are met. |
17 | 17 | if [[ ${image_name} == github-actions-ubuntu* ]] |
18 | 18 | then |
19 | 19 | run_verbose sudo apt-get update |
20 | 20 | # To make 32-bit tests possible. |
21 | | - run_verbose sudo apt-get -qq install --yes m4 g++ |
| 21 | + run_verbose sudo apt-get -qq install --yes g++ |
22 | 22 | elif [[ ${image_name} == *ubuntu* ]] || [[ ${image_name} == *debian* ]] |
23 | 23 | then |
24 | | - run_verbose apt-get -qq install --yes m4 g++ |
| 24 | + run_verbose apt-get -qq install --yes g++ |
25 | 25 | elif [[ ${image_name} == *raspbian* ]] |
26 | 26 | then |
27 | | - run_verbose apt-get -qq install --yes m4 g++ |
| 27 | + run_verbose apt-get -qq install --yes g++ |
28 | 28 | elif [[ ${image_name} == *centos* ]] || [[ ${image_name} == *redhat* ]] || [[ ${image_name} == *fedora* ]] |
29 | 29 | then |
30 | | - run_verbose yum install --assumeyes --quiet m4 gcc-c++ |
| 30 | + run_verbose yum install --assumeyes --quiet gcc-c++ |
31 | 31 | elif [[ ${image_name} == *suse* ]] |
32 | 32 | then |
33 | | - run_verbose zypper --quiet --no-gpg-checks install --no-confirm m4 gcc-c++ |
| 33 | + run_verbose zypper --quiet --no-gpg-checks install --no-confirm gcc-c++ |
34 | 34 | elif [[ ${image_name} == *manjaro* ]] |
35 | 35 | then |
36 | | - run_verbose pacman -S --quiet --noconfirm --noprogressbar m4 g++ |
| 36 | + run_verbose pacman -S --quiet --noconfirm --noprogressbar g++ |
37 | 37 | elif [[ ${image_name} == *archlinux* ]] |
38 | 38 | then |
39 | | - run_verbose pacman -S --quiet --noconfirm --noprogressbar m4 gcc |
| 39 | + run_verbose pacman -S --quiet --noconfirm --noprogressbar gcc |
40 | 40 | fi |
41 | 41 | } |
42 | 42 |
|
43 | 43 | function tests_install_dependencies() |
44 | 44 | { |
45 | | - echo baburiba |
46 | | - env | sort |
| 45 | + echo |
| 46 | + echo "[${FUNCNAME[0]} $@]" |
| 47 | + |
| 48 | + local tests_folder_path="$1" |
| 49 | + local tests_archive_suffix="$2" |
| 50 | + |
| 51 | + mkdir -pv "${tests_folder_path}/downloads" |
| 52 | + |
| 53 | + # https://github.com/xpack-dev-tools/m4-xpack/releases/download/v1.4.19-2/xpack-m4-1.4.19-2-darwin-arm64.tar.gz |
| 54 | + m4_url_base="https://github.com/xpack-dev-tools/m4-xpack/releases/download/" |
| 55 | + m4_version="1.4.19-2" |
| 56 | + |
| 57 | + echo |
| 58 | + echo "Downloading xpack-m4-${m4_version}-${tests_archive_suffix}..." |
| 59 | + run_verbose curl \ |
| 60 | + --fail \ |
| 61 | + --location\ |
| 62 | + --output "${tests_folder_path}/downloads/xpack-m4-${m4_version}-${tests_archive_suffix}" \ |
| 63 | + "${m4_url_base}/v${m4_version}/xpack-m4-${m4_version}-${tests_archive_suffix}" |
| 64 | + |
| 65 | + run_verbose cd "${tests_folder_path}" |
| 66 | + |
| 67 | + echo |
| 68 | + echo "Extracting xpack-m4-${m4_version}-${tests_archive_suffix}..." |
| 69 | + |
| 70 | + # This does not run on Windows, so no need to process .zip archives differently. |
| 71 | + run_verbose tar xf "${tests_folder_path}/downloads/xpack-m4-${m4_version}-${tests_archive_suffix}" |
| 72 | + |
| 73 | + echo |
| 74 | + export PATH="${tests_folder_path}/xpack-m4-${m4_version}/bin:${PATH}" |
| 75 | + echo "PATH=${PATH}" |
| 76 | + |
| 77 | + export M4="$(which m4)" |
| 78 | + echo "M4=${M4}" |
| 79 | + |
| 80 | + echo |
| 81 | + echo "[${FUNCNAME[0]} done]" |
47 | 82 | } |
48 | 83 |
|
49 | 84 | # ----------------------------------------------------------------------------- |
0 commit comments