Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
Opus
Commits
bfebf824
Verified
Commit
bfebf824
authored
2 years ago
by
Mark Harris
Browse files
Options
Downloads
Patches
Plain Diff
Fix quoting and whitespace errors in build test
Reviewed by Jean-Marc Valin.
parent
ef10bf56
No related branches found
No related tags found
1 merge request
!37
Fix quoting and whitespace errors in build test
Pipeline
#3207
passed
2 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/opus_build_test.sh
+10
-11
10 additions, 11 deletions
tests/opus_build_test.sh
tests/random_config.sh
+24
-24
24 additions, 24 deletions
tests/random_config.sh
with
34 additions
and
35 deletions
tests/opus_build_test.sh
+
10
−
11
View file @
bfebf824
#!/bin/sh
tarball
=
`
realpath
$1
`
nb_tests
=
$2
oldvectors
=
`
realpath
$3
`
newvectors
=
`
realpath
$4
`
base
=
`
basename
$tarball
.tar.gz
`
tarball
=
`
realpath
"
$1
"
`
nb_tests
=
"
$2
"
oldvectors
=
`
realpath
"
$3
"
`
newvectors
=
`
realpath
"
$4
"
`
base
=
`
basename
"
$tarball
"
.tar.gz
`
tar
xvf
$tarball
>
/dev/null 2>&1
cd
$base
tar
xvf
"
$tarball
"
>
/dev/null 2>&1
cd
"
$base
"
if
[
$?
-ne
0
]
then
echo
cannot go to
$base
echo
cannot go to
"
$base
"
exit
1
fi
mkdir
build_tests
configure_dir
=
`
pwd
`
seq
-w
$nb_tests
| parallel
--halt
now,fail
=
10
-j
+2
"
../random_config.sh build_tests/run_{}
$configure_dir
$oldvectors
$newvectors
"
seq
-w
"
$nb_tests
"
| parallel
--halt
now,fail
=
10
-j
+2
-q
../random_config.sh
"
build_tests/run_{}
"
"
$configure_dir
"
"
$oldvectors
"
"
$newvectors
"
if
[
$?
-ne
0
]
then
echo
Check found errors
exit
1
else
echo
No error found
echo
No error found
fi
This diff is collapsed.
Click to expand it.
tests/random_config.sh
+
24
−
24
View file @
bfebf824
#!/bin/bash
dir
=
$1
mkdir
$dir
dir
=
"
$1
"
mkdir
"
$dir
"
if
[
$?
-ne
0
]
then
exit
1
fi
cd
$dir
cd
"
$dir
"
if
[
$?
-ne
0
]
then
exit
1
fi
configure_path
=
$2
configure_path
=
"
$2
"
config
=
"random_config.txt"
case
`
seq
3 |
shuf
-n1
`
in
...
...
@@ -45,7 +45,7 @@ sanitize=`echo -e "\n-fsanitize=address -fno-sanitize-recover=all\n-fsanitize=un
CFLAGS
=
"
$CFLAGS
$std
$opt
$arch
$footprint
$math
$sanitize
"
echo
CFLAGS
=
$CFLAGS
>
$config
echo
"
CFLAGS=
$CFLAGS
"
>
"
$config
"
lib
=
`
echo
-e
"
\n
--disable-static
\n
--disable-shared"
|
shuf
-n1
`
...
...
@@ -64,61 +64,61 @@ rfc8251=`echo -e "\n--disable-rfc8251" | shuf -n1`
if
[
"
$rfc8251
"
=
--disable-rfc8251
]
then
vectors
=
$3
vectors
=
"
$3
"
else
vectors
=
$4
vectors
=
"
$4
"
fi
echo
using testvectors at
$vectors
>>
$config
echo
using testvectors at
"
$vectors
"
>>
"
$config
"
config_opt
=
"
$lib
$arithmetic
$custom
$asm
$assert
$harden
$fuzz
$checkasm
$rfc8251
$approx
"
echo
configure
$config_opt
>>
$config
echo
configure
$config_opt
>>
"
$config
"
export
CFLAGS
$configure_path
/configure
$config_opt
>
configure_output.txt 2>&1
"
$configure_path
/configure
"
$config_opt
>
configure_output.txt 2>&1
if
[
$?
-ne
0
]
then
echo
configure FAIL
>>
$config
exit
1
echo
configure FAIL
>>
"
$config
"
exit
1
fi
make
>
make_output.txt 2>&1
if
[
$?
-ne
0
]
then
echo
make FAIL
>>
$config
exit
1
echo
make FAIL
>>
"
$config
"
exit
1
fi
#Run valgrind 5% of the time (minus the asan cases)
if
[
`
seq
20 |
shuf
-n1
`
-ne
1
-o
"
$sanitize
"
=
"-fsanitize=address -fno-sanitize-recover=all"
]
if
[
"
`
seq
20 |
shuf
-n1
`
"
-ne
1
-o
"
$sanitize
"
=
"-fsanitize=address -fno-sanitize-recover=all"
]
then
make check
>
makecheck_output.txt 2>&1
make check
>
makecheck_output.txt 2>&1
else
echo
valgrind enabled
>>
$config
valgrind
--trace-children
=
yes
--error-exitcode
=
128 make check
>
makecheck_output.txt 2>&1
echo
valgrind enabled
>>
"
$config
"
valgrind
--trace-children
=
yes
--error-exitcode
=
128 make check
>
makecheck_output.txt 2>&1
fi
if
[
$?
-ne
0
]
then
echo
check FAIL
>>
$config
exit
1
echo
check FAIL
>>
"
$config
"
exit
1
fi
rate
=
`
echo
-e
"8000
\n
12000
\n
16000
\n
24000
\n
48000"
|
shuf
-n1
`
echo
testvectors
for
$rate
Hz
>
testvectors_output.txt
../../../run_vectors.sh
.
$vectors
$rate
>>
testvectors_output.txt 2>&1
echo
testvectors
for
"
$rate
"
Hz
>
testvectors_output.txt
../../../run_vectors.sh
.
"
$vectors
"
"
$rate
"
>>
testvectors_output.txt 2>&1
if
[
$?
-ne
0
]
then
echo
testvectors FAIL
>>
$config
echo
testvectors FAIL
>>
"
$config
"
exit
1
fi
echo
all tests PASS
>>
$config
echo
all tests PASS
>>
"
$config
"
#When everything's good, do some cleaning up to save space
make distclean
>
/dev/null 2>&1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment