Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Open Source Software
Zipr Backend
Commits
0fc0fa97
Commit
0fc0fa97
authored
9 years ago
by
whh8b
Browse files
Options
Downloads
Patches
Plain Diff
Add shared object tests for readline
parent
33afe495
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitattributes
+1
-0
1 addition, 0 deletions
.gitattributes
test/dylib/Makefile
+17
-3
17 additions, 3 deletions
test/dylib/Makefile
test/dylib/readline_test.c
+11
-0
11 additions, 0 deletions
test/dylib/readline_test.c
with
29 additions
and
3 deletions
.gitattributes
+
1
−
0
View file @
0fc0fa97
...
...
@@ -32,6 +32,7 @@ test/dylib/dylib.c -text
test/dylib/dylib.h -text
test/dylib/dylib_test.c -text
test/dylib/math_test.c -text
test/dylib/readline_test.c -text
third_party/ELFIO/elfio-2.2/AUTHORS -text
third_party/ELFIO/elfio-2.2/COPYING -text
third_party/ELFIO/elfio-2.2/ChangeLog -text
...
...
This diff is collapsed.
Click to expand it.
test/dylib/Makefile
+
17
−
3
View file @
0fc0fa97
all
:
dylib dylib_test math_test
all
:
dylib dylib_test math_test
readline_test
dylib
:
dylib.c dylib.h Makefile
gcc
-shared
-fpic
dylib.c
-olibdylib
.so
dylib_test
:
dylib dylib_test.c Makefile
gcc
-L
.
-o
dylib_test dylib_test.c
-ldylib
math_test
:
math_test.c Makefile
gcc
-o
math_test math_test.c
-lm
readline_test
:
readline_test.c Makefile
gcc
-o
readline_test readline_test.c
-lreadline
libs/libreadline.so.6
:
mkdir
-p
libs/
$$
PEASOUP_HOME/tools/ps_analyze.sh /lib/x86_64-linux-gnu/libreadline.so.6 libs/libreadline.so.6
--backend
zipr
libs/libdylib.so
:
mkdir
-p
libs/
$$
PEASOUP_HOME/tools/ps_analyze.sh libdylib.so libs/libdylib.so
--backend
zipr
libs/libm.so.6
:
mkdir
-p
libs/
$$
PEASOUP_HOME/tools/ps_analyze.sh /lib/x86_64-linux-gnu/libm.so.6 libs/libm.so.6
--backend
zipr
test
:
dylib_test libs/libdylib.so libs/libm.so.6 math_test
test
:
dylib_test libs/libdylib.so math_test libs/libm.so.6 readline_test libs/libreadline.so.6
LD_LIBRARY_PATH
=
libs/ ldd ./dylib_test
LD_LIBRARY_PATH
=
libs/ ./dylib_test
>
dylib_test.protected.out
ldd ./dylib_test
...
...
@@ -25,6 +33,12 @@ test: dylib_test libs/libdylib.so libs/libm.so.6 math_test
./math_test
>
math_test.out
diff math_test.protected.out math_test.out
rm
-rf
math_test
*
.out
LD_LIBRARY_PATH
=
libs/ ldd ./readline_test
echo
"asdf"
|
LD_LIBRARY_PATH
=
libs/ ./readline_test
>
readline_test.protected.out
ldd ./readline_test
echo
"asdf"
| ./readline_test
>
readline_test.out
diff readline_test.protected.out readline_test.out
rm
-rf
readline_test
*
.out
clean
:
rm
-rf
libs dylib dylib_test math_test libdylib.so
rm
-rf
libs dylib dylib_test math_test libdylib.so
readline_test
rm
-rf
peasoup_executable_directory
*
This diff is collapsed.
Click to expand it.
test/dylib/readline_test.c
0 → 100644
+
11
−
0
View file @
0fc0fa97
#include
<stdio.h>
#include
<readline/readline.h>
#include
<readline/history.h>
int
main
()
{
printf
(
"Type your answer: "
);
char
*
answer
=
readline
(
NULL
);
printf
(
"%s is wrong.
\n
"
,
answer
);
return
0
;
}
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