-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-wheels
executable file
·53 lines (53 loc) · 1.47 KB
/
test-wheels
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
let rc=0
if (( $# != 2 ))
then
echo "[ERROR] Supply package output directory and exclusion filter"
exit 1
fi
excluded_packages=""
pip install -U pip wheel setuptools
echo "[INFO] Printing Python Environment"
python3 --version
pip --version
pip freeze
echo "[INFO] Printing Python Environment - FINISHED"
for package in $1/*
do
package_name="${package##*fprime_}"
package_name="${package_name%%-*}"
if [[ "${package_name}" == $2 ]]
then
excluded_packages="${excluded_packages} ${package}"
continue
fi
echo "[INFO] Testing package inatall ${package_name}"
pip install --force-reinstall --no-cache ${package} || exit 2
if (( "$?" != 0 ))
then
echo "[INFO] Testing package inatall ${package_name} - FAILED"
exit 3
fi
echo "[INFO] Testing package inatall ${package_name} - PASSED"
tool_name="${package_name//_/-}"
echo "[INFO] Testing '${tool_name} --help'"
"${tool_name}" --help 1> /dev/null
if (( "$?" != 0 ))
then
echo "[INFO] Testing '${tool_name} --help' - FAILED"
exit 3
fi
echo "[INFO] Testing '${tool_name} --help' - PASSED"
done
for package in ${excluded_packages}
do
echo "[INFO] Testing package inatall ${package_name}"
pip install ${package} || exit 2
if (( "$?" != 0 ))
then
echo "[INFO] Testing package inatall ${package_name} - FAILED"
exit 3
fi
echo "[INFO] Testing package inatall ${package_name} - PASSED"
done
echo "[INFO] Testing packages - PASSED"