GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

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

Add a script to run tests in isolated environment

parent a8264cbb
Pipeline #267310 passed with stages
in 1 minute and 41 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 `./start-unshare.sh` 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.
......
#!/bin/bash
if [[ -z $IN_CONTAINER ]]; then
echo "Please use start-container.sh script"
exit
fi
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
/bin/bash
#!/bin/bash
if (( $EUID != 0 )); then
echo "Please run this script as root"
exit
fi
unshare --ipc --mount --mount-proc --net --pid --fork \
/bin/bash -c "IN_CONTAINER=1 ./start-unshare-impl.sh"
Markdown is supported
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