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
92876d38
Commit
92876d38
authored
Jul 03, 2016
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checked with shellcheck
parent
bce0ce43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
asn1c/tests/check-assembly.sh
asn1c/tests/check-assembly.sh
+18
-18
No files found.
asn1c/tests/check-assembly.sh
View file @
92876d38
...
...
@@ -12,9 +12,9 @@ if [ "x$1" = "x" ]; then
exit
fi
:
${
srcdir
=.
}
:
${
abs_top_srcdir
=
`
pwd
`
/../../
}
:
${
abs_top_builddir
=
`
pwd
`
/../../
}
srcdir
=
"
${
srcdir
:-
.
}
"
abs_top_srcdir
=
"
${
abs_top_srcdir
:-
$(
pwd
)
/../../
}
"
abs_top_builddir
=
"
${
abs_top_builddir
:-
$(
pwd
)
/../../
}
"
if
echo
"
$*
"
|
grep
-q
--
--
;
then
TEST_DRIVER
=
$(
echo
"
$*
"
|
sed
-e
's/ -- .*/--/g'
)
...
...
@@ -25,36 +25,36 @@ else
fi
# Compute the .asn1 spec name by the given file name.
source_short
=
`
echo
"
$source_full
"
|
sed
-e
's/.*\///'
`
testno
=
`
echo
"
$source_short
"
|
cut
-f2
-d
'-'
|
cut
-f1
-d
'.'
`
source_short
=
$(
echo
"
$source_full
"
|
sed
-e
's/.*\///'
)
testno
=
$(
echo
"
$source_short
"
|
cut
-f2
-d
'-'
|
cut
-f1
-d
'.'
)
args
=
`
echo
"
$source_short
"
|
sed
-e
's/\.c[c]*$//'
`
testdir
=
test-
${
args
}
args
=
$(
echo
"
$source_short
"
|
sed
-e
's/\.c[c]*$//'
)
OFS
=
$IFS
IFS
=
"."
set
$args
set
"
$args
"
shift
IFS
=
$OFS
AFLAGS
=
"
$
@
"
AFLAGS
=
"
$
*
"
# Assume the test fails. Will be removed when it passes well.
testdir
=
test-
${
args
}
if
[
-f
"
${
testdir
}
-FAILED"
]
;
then
rm
-rf
${
testdir
}
rm
-rf
"
${
testdir
}
"
fi
touch
${
testdir
}
-FAILED
touch
"
${
testdir
}
-FAILED"
mkdir
-p
$testdir
ln
-fns
../
$source_full
$testdir
mkdir
-p
"
${
testdir
}
"
ln
-fns
"../
${
source_full
}
"
"
${
testdir
}
"
asn_module
=
`
echo
${
abs_top_srcdir
}
/tests/
${
testno
}
-
*
.asn1
`
asn_module
=
$(
echo
"
${
abs_top_srcdir
}
/tests/
${
testno
}
"
-
*
.asn1
)
# Create a Makefile for the project.
cat
>
$testdir
/Makefile
<<
EOM
cat
>
"
$testdir
/Makefile"
<<
EOM
# This file is autogenerated by ../
$0
COMMON_FLAGS= -I.
CFLAGS =
\$
{COMMON_FLAGS}
${
CFLAGS
}
-g -O0
CFLAGS =
\$
{COMMON_FLAGS}
${
CFLAGS
:-
}
-g -O0
CPPFLAGS = -DSRCDIR=../
${
srcdir
}
CXXFLAGS =
\$
{COMMON_FLAGS}
${
CXXFLAGS
}
...
...
@@ -86,7 +86,7 @@ clean:
EOM
# Perform building and checking
${
TEST_DRIVER
}
make
-C
$testdir
check
${
TEST_DRIVER
}
make
-C
"
$testdir
"
check
# Make sure the test is not marked as failed any longer.
rm
-f
${
testdir
}
-FAILED
rm
-f
"
${
testdir
}
-FAILED"
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