Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
60d62678
Commit
60d62678
authored
7 years ago
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support -m32 for 32-bit testing
parent
63a89da5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
+30
-8
tests/tests-randomized/Makefile.am
tests/tests-randomized/Makefile.am
+1
-0
tests/tests-randomized/check-bundles.sh
tests/tests-randomized/check-bundles.sh
+29
-8
No files found.
tests/tests-randomized/Makefile.am
View file @
60d62678
...
...
@@ -10,6 +10,7 @@ TESTS_ENVIRONMENT= \
CC
=
"
${CC}
"
\
MAKE
=
"
${MAKE}
"
\
CFLAGS
=
"
${TESTSUITE_CFLAGS}
${CFLAGS}
"
\
CFLAGS_M32
=
"
${CFLAGS_M32}
"
\
LDFLAGS
=
"
${LDFLAGS}
"
\
LIBFUZZER_CFLAGS
=
"
${LIBFUZZER_CFLAGS}
"
\
ASAN_ENV_FLAGS
=
"@ASAN_ENV_FLAGS@"
\
...
...
This diff is collapsed.
Click to expand it.
tests/tests-randomized/check-bundles.sh
View file @
60d62678
...
...
@@ -42,11 +42,15 @@ parallelism=4
asn1c_flags
=
""
make_clean_before_bundle
()
{
test
"
${
need_clean_before_bundle
}
"
=
"1"
&&
rm
-rf
${
RNDTEMP
}
if
[
"
${
need_clean_before_bundle
}
"
=
"1"
]
;
then
Make clean
fi
}
make_clean_before_test
()
{
test
"
${
need_clean_before_test
}
"
=
"1"
&&
rm
-rf
${
RNDTEMP
}
if
[
"
${
need_clean_before_test
}
"
=
"1"
]
;
then
Make clean
fi
}
# Get all the type-bearding lines in file and process them individually
...
...
@@ -101,23 +105,39 @@ verify_asn_type() {
# compile_and_test "<text>" "<where found>" [<asn.1 flags>]
compile_and_test
()
{
asn
=
"
$1
"
where
=
"
$2
"
asn_flags
=
"
$3
"
if
[
"x
${
asn1c_flags
}
"
!=
"x"
]
;
then
compile_and_test_with
"
$@
"
${
asn1c_flags
}
return
1
compile_and_test_with
"
$asn
"
"
$where
"
"
${
asn1c_flags
}
"
if
[
$?
-ne
0
]
;
then
return
-1
fi
else
compile_and_test_with
"
$
@
"
compile_and_test_with
"
$
asn
"
"
$where
"
if
[
$?
-ne
0
]
;
then
echo
"Can't compile and test narrow"
return
1
fi
compile_and_test_with
"
$
@
"
"-fwide-types"
compile_and_test_with
"
$
asn
"
"
$where
"
"-fwide-types"
if
[
$?
-ne
0
]
;
then
echo
"Can't compile and test wide"
return
2
fi
fi
if
echo
"
${
CFLAGS_M32
}
"
|
grep
-i
'[a-z]'
>
/dev/null
;
then
echo
"Trying the same stuff with 32-bit"
# Unconditional clean, can't reuse object code.
Make clean
# -m32 doesn't support leak sanitizing (it hangs), so we remove
# ASAN_ENV_FLAGS which enable leak check.
CFLAGS
=
"
${
CFLAGS
}
${
CFLAGS_M32
}
"
CFLAGS_M32
=
""
ASAN_ENV_FLAGS
=
""
\
compile_and_test
"
$@
"
fi
return
0
}
...
...
@@ -149,7 +169,7 @@ compile_and_test_with() {
rm
-f
random-test-driver.o
rm
-f
random-test-driver
Make
CFLAGS
=
"
${
CFLAGS
}
"
Make
if
[
$?
-ne
0
]
;
then
echo
"Cannot compile C for
$asn
in
${
RNDTEMP
}
"
return
2
...
...
@@ -238,8 +258,9 @@ asn_compile() {
echo
"Test DEFINITIONS ::= BEGIN
$asn
"
>
test.asn1
echo
"--
${
where
}
"
>>
test.asn1
echo
"END"
>>
test.asn1
echo
"
${
abs_top_builddir
}
/asn1c/asn1c"
-S
"
${
abs_top_srcdir
}
/skeletons"
if
"
${
abs_top_builddir
}
/asn1c/asn1c"
-S
"
${
abs_top_srcdir
}
/skeletons"
\
-gen-OER
-gen-PER
"
$@
"
test.asn1
-gen-OER
-gen-PER
$@
test.asn1
then
echo
"ASN.1 compiled OK"
else
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment