diff mbox series

[1/3] tools/tests: Drop obsolete running scripts

Message ID 20210113123455.23209-2-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series Cleanup to tools/tests | expand

Commit Message

Andrew Cooper Jan. 13, 2021, 12:34 p.m. UTC
The python unit tests were dropped in Xen 4.12 due to being obsolete, but the
scripts to run the tests were missed.  Clean up .gitignore as well

Also drop the libxenctrl {C,LD}FLAGS adjustments in the Makefile.  This logic
isn't used, and isn't appropriate even in principle, as there are tests in
here which don't want to use libxenctrl.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Ian Jackson <iwj@xenproject.org>
---
 .gitignore                          |  3 --
 tools/tests/Makefile                |  3 --
 tools/tests/run_tests.sh            | 61 -------------------------------------
 tools/tests/utests/run_all_tests.py | 23 --------------
 4 files changed, 90 deletions(-)
 delete mode 100644 tools/tests/run_tests.sh
 delete mode 100644 tools/tests/utests/run_all_tests.py

Comments

Ian Jackson Jan. 13, 2021, 1:03 p.m. UTC | #1
Andrew Cooper writes ("[PATCH 1/3] tools/tests: Drop obsolete running scripts"):
> The python unit tests were dropped in Xen 4.12 due to being obsolete, but the
> scripts to run the tests were missed.  Clean up .gitignore as well

I'm happy with this part.

> Also drop the libxenctrl {C,LD}FLAGS adjustments in the Makefile.  This logic
> isn't used, and isn't appropriate even in principle, as there are tests in
> here which don't want to use libxenctrl.

It's not clear to me that it's EBW to link all the tests to libxenctrl
simply to make the build easier.

In a later patch you add these settings back as part of a particular
test target.

I don't much mind it being done this way, and you've done the work, so
I am giving this my ack, but I just wanted to register my qualm in
case you had a second thought.

FTR, however, IMO the -DXC_WANT_COMPAT_DEVICEMODEL_API that you move
to a specific test program in a later patch is something that ought
not to be applied to all tests, so there doing it that way is
necessary - thanks.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Ian.
Andrew Cooper Jan. 13, 2021, 1:15 p.m. UTC | #2
On 13/01/2021 13:03, Ian Jackson wrote:
> Andrew Cooper writes ("[PATCH 1/3] tools/tests: Drop obsolete running scripts"):
>> The python unit tests were dropped in Xen 4.12 due to being obsolete, but the
>> scripts to run the tests were missed.  Clean up .gitignore as well
> I'm happy with this part.
>
>> Also drop the libxenctrl {C,LD}FLAGS adjustments in the Makefile.  This logic
>> isn't used, and isn't appropriate even in principle, as there are tests in
>> here which don't want to use libxenctrl.
> It's not clear to me that it's EBW to link all the tests to libxenctrl
> simply to make the build easier.
>
> In a later patch you add these settings back as part of a particular
> test target.
>
> I don't much mind it being done this way, and you've done the work, so
> I am giving this my ack, but I just wanted to register my qualm in
> case you had a second thought.

These lines aren't used, because this Makefile doesn't compile/link any
code.  They don't apply to subdirs.

More than half the remaining content in tests/ really are unit tests,
and must not be linked against libxc if they want to be run outside of
dom0 (e.g. the developers build box.)

> FTR, however, IMO the -DXC_WANT_COMPAT_DEVICEMODEL_API that you move
> to a specific test program in a later patch is something that ought
> not to be applied to all tests, so there doing it that way is
> necessary - thanks.
>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Thanks,

~Andrew
diff mbox series

Patch

diff --git a/.gitignore b/.gitignore
index b169d78ed7..1b54ea3111 100644
--- a/.gitignore
+++ b/.gitignore
@@ -274,9 +274,6 @@  tools/tests/x86_emulator/x86_emulate
 tools/tests/x86_emulator/xop*.[ch]
 tools/tests/xen-access/xen-access
 tools/tests/xenstore/xs-test
-tools/tests/regression/installed/*
-tools/tests/regression/build/*
-tools/tests/regression/downloads/*
 tools/tests/mem-sharing/memshrtool
 tools/tests/mce-test/tools/xen-mceinj
 tools/tests/vpci/list.h
diff --git a/tools/tests/Makefile b/tools/tests/Makefile
index ed3bed404b..9077fa14d3 100644
--- a/tools/tests/Makefile
+++ b/tools/tests/Makefile
@@ -1,9 +1,6 @@ 
 XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-CFLAGS  += $(CFLAGS_libxenctrl)
-LDLIBS += $(LDLIBS_libxenctrl)
-
 SUBDIRS-y :=
 SUBDIRS-$(CONFIG_X86) += cpu-policy
 SUBDIRS-$(CONFIG_X86) += mce-test
diff --git a/tools/tests/run_tests.sh b/tools/tests/run_tests.sh
deleted file mode 100644
index c492876b4b..0000000000
--- a/tools/tests/run_tests.sh
+++ /dev/null
@@ -1,61 +0,0 @@ 
-#!/bin/bash
-#
-# This runs the available unit-tests with all different supported
-# python versions.
-# 
-# To run this this must be 'cd'ed to the tests directory.
-#
-
-ENABLE_UNSUPPORTED=0
-
-function usage()
-{
-    printf "Usage: %s: [-u]\n" $0
-    printf "   -u: run test with unsupported python versions also\n"
-}
-
-function run_one_test()
-{
-    PYTHON=$1
-    PYTHON_EXECUTABLE=`echo $PYTHON | tr -d "-"`
-    echo "+++ Running tests with $PYTHON"
-    export LD_LIBRARY_PATH=./regression/installed/$PYTHON/lib
-    ./regression/installed/$PYTHON/bin/$PYTHON_EXECUTABLE \
-	utests/run_all_tests.py
-    echo "--- Finished tests with $PYTHON"
-}
-
-function run_all_tests()
-{
-    for PYTHON in $@;
-    do
-	run_one_test $PYTHON
-    done
-}
-
-while getopts u name
-do
-    case $name in
-	h)  usage; exit 0;;
-	u)  ENABLE_UNSUPPORTED=1;;
-	?)  usage; exit 2;;
-    esac
-done
-
-# Build the different python versions
-(cd regression && make -j4 runtime-environment)
-
-# Supported: when an unit test fails this should be seen as an error
-PYTHON_SUPPORTED="python-2.4 python-2.5 python-2.6"
-# Unsupported: failure should be seen as a hint
-PYTHON_UNSUPPORTED="python-3.1"
-
-export PYTHONPATH=`echo $PWD/../python/build/lib.*`:$PWD
-
-set -e
-run_all_tests $PYTHON_SUPPORTED
-
-if test $ENABLE_UNSUPPORTED -eq 1
-then
-    run_all_tests $PYTHON_UNSUPPORTED
-fi
diff --git a/tools/tests/utests/run_all_tests.py b/tools/tests/utests/run_all_tests.py
deleted file mode 100644
index 7318c81ff2..0000000000
--- a/tools/tests/utests/run_all_tests.py
+++ /dev/null
@@ -1,23 +0,0 @@ 
-#============================================================================
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of version 2.1 of the GNU Lesser General Public
-# License as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; If not, see <http://www.gnu.org/licenses/>.
-#============================================================================
-# Copyright (C) 2009 flonatel GmbH & Co. KG
-#============================================================================
-
-import unittest
-
-suite = unittest.TestSuite([])
-
-if __name__ == "__main__":
-    testresult = unittest.TextTestRunner(verbosity=3).run(suite)
-