Commit 2b01b225 authored by Povilas Kanapickas's avatar Povilas Kanapickas
Browse files

Add a script to run tests in isolated environment

parent a8264cbb
Pipeline #267309 passed with stages
in 1 minute and 43 seconds
......@@ -19,17 +19,7 @@ All tests except the input and video module load tests can be run inside a conta
This allows to run the tests in a regular development machine with convenient debugging
and fast turnaround. The only prerequisite is root permissions.
The most convenient way to run the tests is doing the following as root:
$ unshare --ipc --mount --mount-proc --net --pid --fork /bin/bash
# then, in the newly opened shell session, perform the following
$ mkdir -p empty
$ mount --bind empty /dev
$ mount --bind empty /sys
# now the tests can be run
The most convenient way to run the tests is running `./` as root.
This creates a bare-bones environment that shares the filesystem with the rest of the system,
but is otherwise isolated from it. This allows running additional X servers without affecting the
primary X server running on the machine.
if [[ -z $IN_CONTAINER ]]; then
echo "Please use script"
function cleanup {
rm -rf _xorg_integration_test_empty
trap cleanup EXIT
mkdir -p _xorg_integration_test_empty
mount --bind _xorg_integration_test_empty /dev
mount --bind _xorg_integration_test_empty /sys
if (( $EUID != 0 )); then
echo "Please run this script as root"
unshare --ipc --mount --mount-proc --net --pid --fork \
/bin/bash -c "IN_CONTAINER=1 ./"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment