mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
src/net: install tests to target /usr/share/net
Host tools and target are often out of sync, sometimes because we need to run a newer version of iproute2 with more features. By installing tests to target we can still verify basic functionality, provided the tests verify their dependencies and exit 77 (SKIP). Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Tobias Waldekranz
parent
f84b4803d9
commit
a26dd9c19f
@@ -1,6 +1,8 @@
|
||||
EXTRA_DIST = lib.sh $(TESTS)
|
||||
CLEANFILES = *~ *.trs *.log
|
||||
pkgdata_DATA = $(EXTRA_DIST)
|
||||
|
||||
TEST_EXTENSIONS = .sh
|
||||
TESTS_ENVIRONMENT = unshare -mrun
|
||||
TESTS = three-independent.sh
|
||||
|
||||
CLEANFILES = *~ *.trs *.log
|
||||
|
||||
+10
-4
@@ -19,6 +19,9 @@ export NET_DIR
|
||||
|
||||
gen=-1
|
||||
|
||||
NET=$(command -v net)
|
||||
[ -n "$NET" ] || NET=../src/net
|
||||
|
||||
# Exit immediately on error, treat unset variables as error
|
||||
set -eu
|
||||
|
||||
@@ -115,10 +118,11 @@ netdo()
|
||||
{
|
||||
if [ -n "$DEBUG" ]; then
|
||||
tree "$NET_DIR/"
|
||||
echo "Calling: ../src/net $DEBUG apply"
|
||||
echo "Calling: $NET $DEBUG apply"
|
||||
fi
|
||||
|
||||
../src/net $DEBUG apply
|
||||
# shellcheck disable=SC2086
|
||||
$NET $DEBUG apply
|
||||
|
||||
if [ -n "$DEBUG" ]; then
|
||||
ip link
|
||||
@@ -129,7 +133,8 @@ netdo()
|
||||
|
||||
netdown()
|
||||
{
|
||||
../src/net $DEBUG down $@
|
||||
# shellcheck disable=SC2086,SC2068
|
||||
$NET $DEBUG down $@
|
||||
|
||||
if [ -n "$DEBUG" ]; then
|
||||
ip link
|
||||
@@ -139,7 +144,8 @@ netdown()
|
||||
|
||||
netup()
|
||||
{
|
||||
../src/net $DEBUG up $@
|
||||
# shellcheck disable=SC2086,SC2068
|
||||
$NET $DEBUG up $@
|
||||
|
||||
if [ -n "$DEBUG" ]; then
|
||||
ip link
|
||||
|
||||
Reference in New Issue
Block a user