mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 07:16:17 +02:00
* Use atdiff' instead of
cmp' for checking test output.
* Don't use local file names in tests since they will produce different parse trees depending on the current directory.
This commit is contained in:
parent
3277c9432a
commit
ed09821859
5 changed files with 9 additions and 5 deletions
|
@ -128,12 +128,15 @@ AM_CONDITIONAL(HAVE_ATERM, test -n "$aterm")
|
|||
if test -z "$aterm"; then
|
||||
aterm_lib='-L${top_builddir}/externals/inst-aterm/lib -lATerm'
|
||||
aterm_include='-I${top_builddir}/externals/inst-aterm/include'
|
||||
aterm_bin='${top_builddir}/externals/inst-aterm/bin'
|
||||
else
|
||||
aterm_lib="-L$aterm/lib -lATerm"
|
||||
aterm_include="-I$aterm/include"
|
||||
aterm_bin="$aterm/bin"
|
||||
fi
|
||||
AC_SUBST(aterm_lib)
|
||||
AC_SUBST(aterm_include)
|
||||
AC_SUBST(aterm_bin)
|
||||
|
||||
AC_CHECK_LIB(pthread, pthread_mutex_init)
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ TESTS_ENVIRONMENT = TEST_ROOT=$(TEST_ROOT) \
|
|||
NIX_BUILD_HOOK= \
|
||||
TOP=$(shell pwd)/.. \
|
||||
SHARED=$(extra1) \
|
||||
aterm_bin=$(aterm_bin) \
|
||||
$(SHELL) -e
|
||||
|
||||
simple.sh: simple.nix
|
||||
|
|
|
@ -16,7 +16,7 @@ for i in lang/parse-okay-*.nix; do
|
|||
echo "FAIL: $i should parse"
|
||||
fail=1
|
||||
fi
|
||||
if ! cmp lang/$i.ast lang/$i.exp; then
|
||||
if ! $aterm_bin/atdiff lang/$i.ast lang/$i.exp; then
|
||||
echo "FAIL: parse tree of $i not as expected"
|
||||
fail=1
|
||||
fi
|
||||
|
@ -38,7 +38,7 @@ for i in lang/eval-okay-*.nix; do
|
|||
echo "FAIL: $i should evaluate"
|
||||
fail=1
|
||||
fi
|
||||
if ! cmp lang/$i.out lang/$i.exp; then
|
||||
if ! $aterm_bin/atdiff lang/$i.out lang/$i.exp; then
|
||||
echo "FAIL: evaluation result of $i not as expected"
|
||||
fail=1
|
||||
fi
|
||||
|
|
|
@ -1 +1 @@
|
|||
Function([DefFormal("localServer",Var("false")),DefFormal("httpServer",Var("false")),DefFormal("sslSupport",Var("false")),DefFormal("pythonBindings",Var("false")),DefFormal("javaSwigBindings",Var("false")),DefFormal("javahlBindings",Var("false")),NoDefFormal("stdenv"),NoDefFormal("fetchurl"),DefFormal("openssl",Var("null")),DefFormal("httpd",Var("null")),DefFormal("db4",Var("null")),NoDefFormal("expat"),DefFormal("swig",Var("null")),DefFormal("j2sdk",Var("null"))],Assert(OpNEq(Var("expat"),Var("null")),Assert(OpImpl(Var("localServer"),OpNEq(Var("db4"),Var("null"))),Assert(OpImpl(Var("httpServer"),OpAnd(OpNEq(Var("httpd"),Var("null")),OpEq(Select(Var("httpd"),"expat"),Var("expat")))),Assert(OpImpl(Var("sslSupport"),OpAnd(OpNEq(Var("openssl"),Var("null")),OpImpl(Var("httpServer"),OpEq(Select(Var("httpd"),"openssl"),Var("openssl"))))),Assert(OpImpl(Var("pythonBindings"),OpAnd(OpNEq(Var("swig"),Var("null")),Select(Var("swig"),"pythonSupport"))),Assert(OpImpl(Var("javaSwigBindings"),OpAnd(OpNEq(Var("swig"),Var("null")),Select(Var("swig"),"javaSupport"))),Assert(OpImpl(Var("javahlBindings"),OpNEq(Var("j2sdk"),Var("null"))),Call(Select(Var("stdenv"),"mkDerivation"),Attrs([Bind("name",Str("subversion-1.1.1"),Pos("(string)",20,7)),Bind("builder",Path("/home/eelco/nix/tests/builder.sh"),Pos("(string)",22,10)),Bind("src",Call(Var("fetchurl"),Attrs([Bind("url",Uri("http://subversion.tigris.org/tarballs/subversion-1.1.1.tar.bz2"),Pos("(string)",24,8)),Bind("md5",Str("a180c3fe91680389c210c99def54d9e0"),Pos("(string)",25,8))])),Pos("(string)",23,6)),Bind("patches",If(Var("javahlBindings"),List([Path("/home/eelco/nix/tests/javahl.patch")]),List([])),Pos("(string)",31,10)),Bind("openssl",If(Var("sslSupport"),Var("openssl"),Var("null")),Pos("(string)",33,10)),Bind("httpd",If(Var("httpServer"),Var("httpd"),Var("null")),Pos("(string)",34,8)),Bind("db4",If(Var("localServer"),Var("db4"),Var("null")),Pos("(string)",35,6)),Bind("swig",If(OpOr(Var("pythonBindings"),Var("javaSwigBindings")),Var("swig"),Var("null")),Pos("(string)",36,7)),Bind("python",If(Var("pythonBindings"),Select(Var("swig"),"python"),Var("null")),Pos("(string)",37,9)),Bind("j2sdk",If(Var("javaSwigBindings"),Select(Var("swig"),"j2sdk"),If(Var("javahlBindings"),Var("j2sdk"),Var("null"))),Pos("(string)",38,8)),Bind("expat",Var("expat"),Pos("(string)",41,10)),Bind("localServer",Var("localServer"),Pos("(string)",41,10)),Bind("httpServer",Var("httpServer"),Pos("(string)",41,10)),Bind("sslSupport",Var("sslSupport"),Pos("(string)",41,10)),Bind("pythonBindings",Var("pythonBindings"),Pos("(string)",41,10)),Bind("javaSwigBindings",Var("javaSwigBindings"),Pos("(string)",41,10)),Bind("javahlBindings",Var("javahlBindings"),Pos("(string)",41,10))])),Pos("(string)",17,7)),Pos("(string)",16,7)),Pos("(string)",15,7)),Pos("(string)",14,7)),Pos("(string)",13,7)),Pos("(string)",12,7)),Pos("(string)",11,7)),Pos("(string)",1,2))
|
||||
Function([DefFormal("localServer",Var("false")),DefFormal("httpServer",Var("false")),DefFormal("sslSupport",Var("false")),DefFormal("pythonBindings",Var("false")),DefFormal("javaSwigBindings",Var("false")),DefFormal("javahlBindings",Var("false")),NoDefFormal("stdenv"),NoDefFormal("fetchurl"),DefFormal("openssl",Var("null")),DefFormal("httpd",Var("null")),DefFormal("db4",Var("null")),NoDefFormal("expat"),DefFormal("swig",Var("null")),DefFormal("j2sdk",Var("null"))],Assert(OpNEq(Var("expat"),Var("null")),Assert(OpImpl(Var("localServer"),OpNEq(Var("db4"),Var("null"))),Assert(OpImpl(Var("httpServer"),OpAnd(OpNEq(Var("httpd"),Var("null")),OpEq(Select(Var("httpd"),"expat"),Var("expat")))),Assert(OpImpl(Var("sslSupport"),OpAnd(OpNEq(Var("openssl"),Var("null")),OpImpl(Var("httpServer"),OpEq(Select(Var("httpd"),"openssl"),Var("openssl"))))),Assert(OpImpl(Var("pythonBindings"),OpAnd(OpNEq(Var("swig"),Var("null")),Select(Var("swig"),"pythonSupport"))),Assert(OpImpl(Var("javaSwigBindings"),OpAnd(OpNEq(Var("swig"),Var("null")),Select(Var("swig"),"javaSupport"))),Assert(OpImpl(Var("javahlBindings"),OpNEq(Var("j2sdk"),Var("null"))),Call(Select(Var("stdenv"),"mkDerivation"),Attrs([Bind("name",Str("subversion-1.1.1"),Pos("(string)",20,7)),Bind("builder",Path("/foo/bar"),Pos("(string)",22,10)),Bind("src",Call(Var("fetchurl"),Attrs([Bind("url",Uri("http://subversion.tigris.org/tarballs/subversion-1.1.1.tar.bz2"),Pos("(string)",24,8)),Bind("md5",Str("a180c3fe91680389c210c99def54d9e0"),Pos("(string)",25,8))])),Pos("(string)",23,6)),Bind("patches",If(Var("javahlBindings"),List([Path("/javahl.patch")]),List([])),Pos("(string)",31,10)),Bind("openssl",If(Var("sslSupport"),Var("openssl"),Var("null")),Pos("(string)",33,10)),Bind("httpd",If(Var("httpServer"),Var("httpd"),Var("null")),Pos("(string)",34,8)),Bind("db4",If(Var("localServer"),Var("db4"),Var("null")),Pos("(string)",35,6)),Bind("swig",If(OpOr(Var("pythonBindings"),Var("javaSwigBindings")),Var("swig"),Var("null")),Pos("(string)",36,7)),Bind("python",If(Var("pythonBindings"),Select(Var("swig"),"python"),Var("null")),Pos("(string)",37,9)),Bind("j2sdk",If(Var("javaSwigBindings"),Select(Var("swig"),"j2sdk"),If(Var("javahlBindings"),Var("j2sdk"),Var("null"))),Pos("(string)",38,8)),Bind("expat",Var("expat"),Pos("(string)",41,10)),Bind("localServer",Var("localServer"),Pos("(string)",41,10)),Bind("httpServer",Var("httpServer"),Pos("(string)",41,10)),Bind("sslSupport",Var("sslSupport"),Pos("(string)",41,10)),Bind("pythonBindings",Var("pythonBindings"),Pos("(string)",41,10)),Bind("javaSwigBindings",Var("javaSwigBindings"),Pos("(string)",41,10)),Bind("javahlBindings",Var("javahlBindings"),Pos("(string)",41,10))])),Pos("(string)",17,7)),Pos("(string)",16,7)),Pos("(string)",15,7)),Pos("(string)",14,7)),Pos("(string)",13,7)),Pos("(string)",12,7)),Pos("(string)",11,7)),Pos("(string)",1,2))
|
||||
|
|
|
@ -19,7 +19,7 @@ assert javahlBindings -> j2sdk != null;
|
|||
stdenv.mkDerivation {
|
||||
name = "subversion-1.1.1";
|
||||
|
||||
builder = ./builder.sh;
|
||||
builder = /foo/bar;
|
||||
src = fetchurl {
|
||||
url = http://subversion.tigris.org/tarballs/subversion-1.1.1.tar.bz2;
|
||||
md5 = "a180c3fe91680389c210c99def54d9e0";
|
||||
|
@ -28,7 +28,7 @@ stdenv.mkDerivation {
|
|||
# This is a hopefully temporary fix for the problem that
|
||||
# libsvnjavahl.so isn't linked against libstdc++, which causes
|
||||
# loading the library into the JVM to fail.
|
||||
patches = if javahlBindings then [./javahl.patch] else [];
|
||||
patches = if javahlBindings then [/javahl.patch] else [];
|
||||
|
||||
openssl = if sslSupport then openssl else null;
|
||||
httpd = if httpServer then httpd else null;
|
||||
|
|
Loading…
Reference in a new issue