Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ TESTS = $(wildcard *.asm)
RM_F = rm -f
RM_RF = rm -rf

.PHONY: tools nasm ndisasm ffmpegtest x264test
.PHONY: tools nasm ndisasm ffmpegtest x264test dav1dtest
tools:
$(MAKE) -C .. all

Expand All @@ -35,6 +35,9 @@ ffmpegtest:
x264test:
bash projtest.sh '$(NASM)' $@

dav1dtest:
bash projtest.sh '$(NASM)' $@

%.bin: %.asm $(NASM)
$(NASM) $(NASMOPT) -f bin -o $@ -MD [email protected] -l [email protected] $<

Expand Down Expand Up @@ -119,7 +122,7 @@ clean:
$(RM_F) *.aoutb
$(RM_RF) testresults
$(RM_F) elftest elftest64
$(RM_RF) ffmpegtest x264test
$(RM_RF) ffmpegtest x264test dav1dtest

spotless: clean
$(RM_RF) golden
Expand Down
19 changes: 19 additions & 0 deletions test/get_build_dav1dtest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

: >> "$filelist"

if [ -d dav1d/.git ]; then
cd dav1d
git reset --hard
cd build
xargs -r rm -f < "$filelist"
ninja clean
else
git clone https://code.videolan.org/videolan/dav1d.git dav1d
mkdir -p dav1d/build
cd dav1d/build
meson setup ..
fi
: > "$filelist"
#ncpus=$(ls -1 /sys/bus/cpu/devices | wc -l)
ninja -v
25 changes: 20 additions & 5 deletions test/nasm
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
#!/bin/bash

DASHO=0

declare -a param1
declare -a param2
for p; do
case "$p" in
*.o) ofile="$p"
param1+=("$p.1" '-l' "$p.lst.1")
param2+=("$p.2" '-l' "$p.lst.2")
printf '%s\n%s.2\n%s.lst.2\n' "$ofile" "$ofile" "$ofile" \
-o ) param1+=("$p")
param2+=("$p")
DASHO=1
;;
*.o | *.obj)
if [ "${DASHO}" -eq "1" ]; then
DASHO=0
ofile="$p"
param1+=("$p.1" '-l' "$p.lst.1")
param2+=("$p.2" '-l' "$p.lst.2")
printf '%s\n%s.2\n%s.lst.2\n' "$ofile" "$ofile" "$ofile" \
>> "$projnasm_filelist"
else
param1+=("$p")
param2+=("$p")
fi
;;
*) param1+=("$p")
param2+=("$p")
Expand All @@ -21,4 +34,6 @@ printf '%s\n' "$*" >> "$projnasm_logfile"
rm -f "$ofile"
"$projnasm_nasm1" "${param1[@]}" || exit $?
"$projnasm_nasm2" "${param2[@]}" || exit $?
cp -f "$ofile.1" "$ofile"
if [ -f $ofile.1 ]; then
cp -f "$ofile.1" "$ofile"
fi
5 changes: 4 additions & 1 deletion test/projtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ fi
set +x

{
for x in $(grep -o -P "\-o .*\.o" $logfile | sed -e 's/-o //')
for y in "o" "obj"
do
for x in $(grep -o -P "\-o .*\.${y}" $logfile | sed -e 's/-o //')
do
if ! [ -f $x ]; then
# probably it's a temporary assembly being tested
Expand All @@ -74,6 +76,7 @@ do
fi
rm -f /tmp/1.dump /tmp/2.dump
done
done
} | tee "$here/results"

rev=$(! grep -e " does not exist" -e "\[differs\]" $here/results >/dev/null)
Expand Down