Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
chr-curry
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
curry-packages
chr-curry
Commits
5c0c6b6d
Commit
5c0c6b6d
authored
3 years ago
by
Michael Hanus
Browse files
Options
Downloads
Patches
Plain Diff
Update test script
parent
be4e9f6f
Branches
master
Tags
v3.0.0
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/test.sh
+7
-13
7 additions, 13 deletions
examples/test.sh
with
7 additions
and
13 deletions
examples/test.sh
+
7
−
13
View file @
5c0c6b6d
#!/bin/sh
# Shell script to test the current set of CHR(Curry) examples
# Root location of the Curry System specified by variable CURRYROOT
CURRYROOT
=
`
$CURRYBIN
:set v0 :set
-time
:add Curry.Compiler.Distribution :eval
"putStrLn installDir"
:quit
`
CURRYBINDIR
=
$CURRYROOT
/bin
BACKEND
=
`
$CURRYBIN
--noreadline
:set v0 :set
-time
:load Curry.Compiler.Distribution :eval
"putStrLn (curryRuntime ++ show curryRuntimeMajorVersion)"
:quit 2> /dev/null
`
VERBOSE
=
no
VERBOSE
=
no
# no longer used...
if
[
"
$1
"
=
"-v"
]
;
then
VERBOSE
=
yes
fi
# Extract information about the back end:
BACKEND
=
`
$CURRYBIN
--noreadline
:set v0 :set
-time
:load Curry.Compiler.Distribution :eval
"putStrLn (curryRuntime ++ show curryRuntimeMajorVersion)"
:quit 2> /dev/null
`
# check back end:
if
[
"
$BACKEND
"
!=
sicstus4
-a
"
$BACKEND
"
!=
swi6
-a
"
$BACKEND
"
!=
swi7
-a
"
$BACKEND
"
!=
swi8
]
;
then
echo
"No appropriate Prolog back end, skip the CHR tests."
exit
fi
LOGFILE
=
xxx
$$
$CURRYBINDIR
/clean
curry
/bin/rm
-rf
.
curry
cat
<<
EOM
|
$CURRYBIN
-q :set -interactive :set v0 :set printdepth 0 :set -time :set +echo | tee
$LOGFILE
:load Leq
main10 x where x free
...
...
@@ -74,14 +71,11 @@ main86 i where i free
EOM
# clean up:
for
p
in
GCDCHR FIBCHR UFCHR GAUSSCHR
;
do
$CURRYBINDIR
/cleancurry
$p
/bin/rm
-f
$p
*
done
$CURRYBINDIR
/clean
curry
/bin/rm
-rf
.
curry
################ end of tests ####################
if
[
$VERBOSE
=
yes
]
;
then
cat
$LOGFILE
fi
# Check differences:
DIFF
=
diff
$$
diff TESTRESULT
$LOGFILE
>
$DIFF
...
...
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