Created
May 23, 2018 05:17
-
-
Save alex-pat/f5a5a03fe083c940380fd46347fbf13a to your computer and use it in GitHub Desktop.
diploma: update samples and tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IMG=qemu-image.img | |
SRC=~/linux/linux-cc | |
OBJ=~/linux/objcc | |
MNTPOINT=mnt | |
sudo mount "$IMG" -o loop "$MNTPOINT" || exit 1 | |
sudo mkdir -p "$MNTPOINT/root/tests" || exit 1 | |
for i in \ | |
pidmap/pidmap \ | |
fdmap/fdmap_test \ | |
pidfdinfo/pidfdinfo \ | |
; do | |
echo -n $(basename "$i")... | |
sudo cp "$SRC/tools/testing/selftests/$i" "$MNTPOINT/root/tests/$(basename "$i")" || exit 1 | |
echo OK | |
done | |
sudo mkdir -p "$MNTPOINT/root/samples" || exit 1 | |
for i in \ | |
lsof \ | |
; do | |
echo -n $(basename "$i")... | |
sudo cp "$OBJ/samples/taskinfo/$i" "$MNTPOINT/root/samples/$(basename "$i")" || exit 1 | |
echo OK | |
done | |
sudo umount "$MNTPOINT" || exit 1 | |
echo Done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment