mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 09:21:57 -05:00
CMake: Remove all uses of globs in conventional builds
This also makes the Shell tests run on Lagom again, as they have been
silently skipped ever since d46be35f
(which moved the tests but didn't
update the glob.)
This commit is contained in:
parent
9d6ef8989d
commit
c98071dd69
2 changed files with 251 additions and 12 deletions
|
@ -657,12 +657,12 @@ if (BUILD_LAGOM)
|
|||
|
||||
enable_testing()
|
||||
# LibTest
|
||||
file(GLOB LIBTEST_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibTest/*.cpp")
|
||||
list(FILTER LIBTEST_SOURCES EXCLUDE REGEX ".*Main.cpp$")
|
||||
add_library(
|
||||
LibTest
|
||||
${LIBTEST_SOURCES}
|
||||
set(LIBTEST_SOURCES
|
||||
../../Userland/Libraries/LibTest/AsyncTestStreams.cpp
|
||||
../../Userland/Libraries/LibTest/TestSuite.cpp
|
||||
../../Userland/Libraries/LibTest/CrashTest.cpp
|
||||
)
|
||||
add_library(LibTest ${LIBTEST_SOURCES})
|
||||
target_link_libraries(LibTest PRIVATE AK LibCore LibFileSystem)
|
||||
set_target_properties(LibTest PROPERTIES OUTPUT_NAME lagom-test)
|
||||
add_library(
|
||||
|
@ -785,13 +785,30 @@ if (BUILD_LAGOM)
|
|||
|
||||
# Tests that are not LibTest based
|
||||
# Shell
|
||||
file(GLOB SHELL_TESTS CONFIGURE_DEPENDS "../../Userland/Shell/Tests/*.sh")
|
||||
foreach(TEST_PATH ${SHELL_TESTS})
|
||||
get_filename_component(TEST_NAME ${TEST_PATH} NAME_WE)
|
||||
set(SHELL_TESTS
|
||||
backgrounding.sh
|
||||
brace-exp.sh
|
||||
builtin-redir.sh
|
||||
builtin-test.sh
|
||||
control-structure-as-command.sh
|
||||
function.sh
|
||||
heredocs.sh
|
||||
if.sh
|
||||
immediate.sh
|
||||
loop.sh
|
||||
match.sh
|
||||
sigpipe.sh
|
||||
slice.sh
|
||||
special-vars.sh
|
||||
subshell.sh
|
||||
valid.sh
|
||||
)
|
||||
foreach(TEST_SCRIPT ${SHELL_TESTS})
|
||||
get_filename_component(TEST_NAME ${TEST_SCRIPT} NAME_WE)
|
||||
add_test(
|
||||
NAME "Shell-${TEST_NAME}"
|
||||
COMMAND Shell --skip-shellrc "${TEST_PATH}"
|
||||
WORKING_DIRECTORY ${SERENITY_PROJECT_ROOT}/Userland/Shell/Tests
|
||||
COMMAND Shell --skip-shellrc "${TEST_SCRIPT}"
|
||||
WORKING_DIRECTORY ${SERENITY_PROJECT_ROOT}/Tests/LibShell/Tests
|
||||
)
|
||||
set_tests_properties("Shell-${TEST_NAME}" PROPERTIES
|
||||
TIMEOUT 10
|
||||
|
|
|
@ -1,5 +1,227 @@
|
|||
file(GLOB CMD_SOURCES_CPP CONFIGURE_DEPENDS "*.cpp")
|
||||
file(GLOB CMD_SOURCES_JAKT CONFIGURE_DEPENDS "*.jakt")
|
||||
set(CMD_SOURCES_CPP
|
||||
abench.cpp
|
||||
aconv.cpp
|
||||
adjtime.cpp
|
||||
allocate.cpp
|
||||
animation.cpp
|
||||
aplay.cpp
|
||||
arp.cpp
|
||||
asctl.cpp
|
||||
base64.cpp
|
||||
basename.cpp
|
||||
beep.cpp
|
||||
blockdev.cpp
|
||||
bt.cpp
|
||||
cal.cpp
|
||||
cat.cpp
|
||||
checksum.cpp
|
||||
chgrp.cpp
|
||||
chmod.cpp
|
||||
chown.cpp
|
||||
chres.cpp
|
||||
cksum.cpp
|
||||
clear.cpp
|
||||
cmp.cpp
|
||||
comm.cpp
|
||||
config.cpp
|
||||
copy.cpp
|
||||
copy_mount.cpp
|
||||
cp.cpp
|
||||
cpp-lexer.cpp
|
||||
cpp-parser.cpp
|
||||
cpp-preprocessor.cpp
|
||||
crypto-bench.cpp
|
||||
cut.cpp
|
||||
date.cpp
|
||||
dd.cpp
|
||||
df.cpp
|
||||
diff.cpp
|
||||
dirname.cpp
|
||||
disasm.cpp
|
||||
disk_benchmark.cpp
|
||||
dmesg.cpp
|
||||
drain.cpp
|
||||
du.cpp
|
||||
echo.cpp
|
||||
elfdeps.cpp
|
||||
env.cpp
|
||||
errno.cpp
|
||||
expr.cpp
|
||||
false.cpp
|
||||
fdtdump.cpp
|
||||
file.cpp
|
||||
find.cpp
|
||||
flock.cpp
|
||||
fortune.cpp
|
||||
functrace.cpp
|
||||
fusermount.cpp
|
||||
glsl-compiler.cpp
|
||||
gml-format.cpp
|
||||
grep.cpp
|
||||
gron.cpp
|
||||
groupadd.cpp
|
||||
groupdel.cpp
|
||||
groups.cpp
|
||||
gzip.cpp
|
||||
head.cpp
|
||||
headless-browser.cpp
|
||||
hexdump.cpp
|
||||
host.cpp
|
||||
hostname.cpp
|
||||
icc.cpp
|
||||
iconv.cpp
|
||||
id.cpp
|
||||
ifconfig.cpp
|
||||
image.cpp
|
||||
image2bin.cpp
|
||||
ini.cpp
|
||||
init.cpp
|
||||
install.cpp
|
||||
isobmff.cpp
|
||||
js.cpp
|
||||
json.cpp
|
||||
kcov-example.cpp
|
||||
keymap.cpp
|
||||
kill.cpp
|
||||
killall.cpp
|
||||
less.cpp
|
||||
listdir.cpp
|
||||
ln.cpp
|
||||
logout.cpp
|
||||
ls.cpp
|
||||
lsblk.cpp
|
||||
lscpu.cpp
|
||||
lsdev.cpp
|
||||
lsirq.cpp
|
||||
lsof.cpp
|
||||
lspci.cpp
|
||||
lsusb.cpp
|
||||
lzcat.cpp
|
||||
man.cpp
|
||||
markdown-check.cpp
|
||||
matroska.cpp
|
||||
md.cpp
|
||||
memstat.cpp
|
||||
mkdir.cpp
|
||||
mkfifo.cpp
|
||||
mkfs.fat.cpp
|
||||
mknod.cpp
|
||||
mktemp.cpp
|
||||
mount.cpp
|
||||
mv.cpp
|
||||
nc.cpp
|
||||
netstat.cpp
|
||||
network-settings.cpp
|
||||
nl.cpp
|
||||
nohup.cpp
|
||||
nologin.cpp
|
||||
notify.cpp
|
||||
nproc.cpp
|
||||
ntpquery.cpp
|
||||
open.cpp
|
||||
passwd.cpp
|
||||
paste.cpp
|
||||
patch.cpp
|
||||
pathchk.cpp
|
||||
pdf.cpp
|
||||
pgrep.cpp
|
||||
pidof.cpp
|
||||
ping.cpp
|
||||
pixelflut.cpp
|
||||
pkill.cpp
|
||||
pledge.cpp
|
||||
pls.cpp
|
||||
pmap.cpp
|
||||
pmemdump.cpp
|
||||
printf.cpp
|
||||
pro.cpp
|
||||
profile.cpp
|
||||
ps.cpp
|
||||
purge.cpp
|
||||
pwd.cpp
|
||||
readelf.cpp
|
||||
readlink.cpp
|
||||
realpath.cpp
|
||||
reboot.cpp
|
||||
rev.cpp
|
||||
rm.cpp
|
||||
rmdir.cpp
|
||||
route.cpp
|
||||
run-tests.cpp
|
||||
sed.cpp
|
||||
seq.cpp
|
||||
shot.cpp
|
||||
shred.cpp
|
||||
shuf.cpp
|
||||
shutdown.cpp
|
||||
sizefmt.cpp
|
||||
sleep.cpp
|
||||
slugify.cpp
|
||||
sort.cpp
|
||||
sql.cpp
|
||||
stat.cpp
|
||||
strace.cpp
|
||||
strings.cpp
|
||||
stty.cpp
|
||||
su.cpp
|
||||
sync.cpp
|
||||
syscall.cpp
|
||||
sysctl.cpp
|
||||
tac.cpp
|
||||
tail.cpp
|
||||
tar.cpp
|
||||
tee.cpp
|
||||
telws.cpp
|
||||
test-bindtodevice.cpp
|
||||
test-fuzz.cpp
|
||||
test-imap.cpp
|
||||
test-jpeg-roundtrip.cpp
|
||||
test-pthread.cpp
|
||||
test-unveil.cpp
|
||||
test.cpp
|
||||
test_env.cpp
|
||||
timezone.cpp
|
||||
top.cpp
|
||||
touch.cpp
|
||||
tr.cpp
|
||||
traceroute.cpp
|
||||
tree.cpp
|
||||
true.cpp
|
||||
truncate.cpp
|
||||
tsort.cpp
|
||||
tt.cpp
|
||||
ttfdisasm.cpp
|
||||
tty.cpp
|
||||
umount.cpp
|
||||
uname.cpp
|
||||
uniq.cpp
|
||||
unveil.cpp
|
||||
unzip.cpp
|
||||
update-cpp-test-results.cpp
|
||||
uptime.cpp
|
||||
useradd.cpp
|
||||
userdel.cpp
|
||||
usermod.cpp
|
||||
utmpupdate.cpp
|
||||
w.cpp
|
||||
wallpaper.cpp
|
||||
wasm.cpp
|
||||
watch.cpp
|
||||
watchfs.cpp
|
||||
wc.cpp
|
||||
which.cpp
|
||||
whoami.cpp
|
||||
wsctl.cpp
|
||||
xargs.cpp
|
||||
xml.cpp
|
||||
xxd.cpp
|
||||
xzcat.cpp
|
||||
yes.cpp
|
||||
zip.cpp
|
||||
)
|
||||
set(CMD_SOURCES_JAKT
|
||||
hello-world.jakt
|
||||
)
|
||||
if (ENABLE_JAKT)
|
||||
list(APPEND CMD_SOURCES ${CMD_SOURCES_CPP} ${CMD_SOURCES_JAKT})
|
||||
else()
|
||||
|
|
Loading…
Reference in a new issue