File: exercise

package info (click to toggle)
lxcfs 6.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 716 kB
  • sloc: ansic: 10,144; sh: 757; makefile: 37; python: 32
file content (18 lines) | stat: -rwxr-xr-x 518 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

if [ ! -d /sys/fs/cgroup/memory ]; then
  if [ ! "$AUTOPKGTEST_REBOOT_MARK" = "lxc-prepare" ]; then
    sed -i '/GRUB_CMDLINE_LINUX_DEFAULT/ s/GRUB_CMDLINE_LINUX_DEFAULT="\(.*\)"/GRUB_CMDLINE_LINUX_DEFAULT="\1 cgroup_enable=memory swapaccount=1"/' /etc/default/grub
    update-grub2
    /tmp/autopkgtest-reboot lxc-prepare
  fi
fi

set -eu

echo 1 > /sys/fs/cgroup/cpuset/cgroup.clone_children
chmod ugo+x tests/test_confinement.sh
dpkg-source --before-build .
debian/rules build
make tests
./tests/main.sh