Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CoPaR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Informatik 8
CoPaR
Merge requests
!3
Add build script that wraps stack
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Add build script that wraps stack
build-script
into
master
Overview
3
Commits
3
Pipelines
2
Changes
1
Merged
Hans-Peter Deifel
requested to merge
build-script
into
master
6 years ago
Overview
3
Commits
3
Pipelines
2
Changes
1
@thorsten
ist das skript halbwegs sinnvolles bash?
0
0
Merge request reports
Compare
master
version 1
d0815e4d
6 years ago
master (base)
and
latest version
latest version
ee39e382
3 commits,
6 years ago
version 1
d0815e4d
1 commit,
6 years ago
1 file
+
74
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
build.sh
0 → 100755
+
74
−
0
View file @ ee39e382
Edit in single-file editor
Open in Web IDE
#!/usr/bin/env bash
# A simple wrapper around stack
#
# This exists mainly to make it easier to pass arguments to test and benchmark
# suites.
if
[[
$#
-eq
0
]]
;
then
cat
<<
EOF
Usage:
$0
COMMAND [OPTS]
Commands:
---------
b[uild] [OPTS] build project
t[est] u[nit] [OPTS] run unit tests
t[est] e[xamples] [OPTS] run exampes
t[est] d[octests] [OPTS] run doctests
t[est] [OPTS] run all testsuites
bench [OPTS] run the benchmark suite
r[un] [OPTS] run the main program
haddock [OPTS] build documentation
EOF
exit
1
fi
doTest
()
{
if
[[
$#
-eq
0
]]
;
then
exec
stack
test
fi
case
"
$1
"
in
u|unit|s|spec
)
exec
stack
test
:spec
--test-arguments
"
${
*
:2
}
"
;;
e|examples
)
exec
stack
test
:examples
--test-arguments
"
${
*
:2
}
"
;;
d|doctests
)
exec
stack
test
:doctests
--test-arguments
"
${
*
:2
}
"
;;
*
)
exec
stack
test
"
$@
"
esac
}
doBench
()
{
exec
stack bench :bench
--benchmark-arguments
"
$*
"
}
case
"
$1
"
in
b|build
)
exec
stack build
"
${
@
:2
}
"
;;
t|test
)
doTest
"
${
@
:2
}
"
;;
bench
)
doBench
"
${
@
:2
}
"
;;
r|run
)
exec
stack
exec
ma
--
"
${
@
:2
}
"
;;
haddock
)
exec
stack haddock :ma
"
${
@
:2
}
"
;;
*
)
echo
"Unknown command
$1
"
exit
1
esac
Loading