Skip to content
Snippets Groups Projects
Commit d6acf72c authored by Elana Hashman's avatar Elana Hashman
Browse files

Fix broken autopkgtests

parent da6c961d
No related branches found
No related tags found
No related merge requests found
leiningen-clojure (2.8.1-2) UNRELEASED; urgency=medium
* Fix package dependencies.
* Fix broken autopkgtests.
-- Elana Hashman <ehashman@debian.org> Sat, 23 Dec 2017 20:18:05 +0000
......
Depends: @, clojure
Depends: @, clojure, libbultitude-clojure, libclasslojure-clojure, librobert-hooke-clojure, libpomegranate-clojure, libdynapath-clojure, libcom-hypirion-io-clojure, libtools-macro-clojure, libcomplete-clojure, libwagon2-java, libslf4j-java
Restrictions: allow-stderr
Tests: import-core, test-lein
Tests: import-core
Depends: @, bash
Tests: test-lein
#!/bin/sh
#!/bin/bash
_check_task() {
if [[ ! "$1" =~ "$2" ]]; then
echo "lein check failed"
echo "diff:"
diff <(echo "$1") <(echo "$2")
rm -rf /tmp/lein-test
exit 1
fi
}
cd /tmp
HELP_TEXT=<<EOF
Leiningen is a tool for working with Clojure projects.
HELP_TEXT="Leiningen is a tool for working with Clojure projects.
Several tasks are available:
change Rewrite project.clj by applying a function.
......@@ -36,7 +45,7 @@ vcs Interact with the version control system.
version Print version for Leiningen and the current JVM.
with-profile Apply the given task with the profile(s) specified.
Run `lein help $TASK` for details.
Run \`lein help \$TASK\` for details.
Global Options:
-o Run a task offline.
......@@ -48,30 +57,20 @@ These aliases are available:
downgrade, expands to upgrade
See also: readme, faq, tutorial, news, sample, profiles, deploying, gpg,
mixed-source, templates, and copying.
EOF
HELP_OUTPUT=`lein help`
mixed-source, templates, and copying."
HELP_OUTPUT=`lein help 2>&1`
_check_task "$HELP_TEXT" "$HELP_OUTPUT"
if [[ ! $HELP_TEXT =~ "$HELP_OUTPUT" ]]; then
echo "lein help check failed"
exit 1
fi
NEW_APP_TEXT="Generating a project called lein-test based on the 'app' template."
NEW_APP_OUTPUT=`lein new app lein-test 2>&1`
_check_task "$NEW_APP_TEXT" "$NEW_APP_OUTPUT"
NEW_APP_TEXT="Generating a project called foo based on the 'app' template."
NEW_APP_OUTPUT=`lein new app foo`
cd /tmp/lein-test
if [[ ! $NEW_APP_TEXT =~ "$NEW_APP_OUTPUT" ]]; then
echo "lein new app check failed"
exit 1
fi
TEST_TEXT='
lein test lein-test.core-test
cd /tmp/foo
TEST_TEXT=<<EOF
lein test foobar.core-test
lein test :only foobar.core-test/a-test
lein test :only lein-test.core-test/a-test
FAIL in (a-test) (core_test.clj:7)
FIXME, I fail.
......@@ -80,42 +79,23 @@ expected: (= 0 1)
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
Tests failed.
EOF
TEST_OUTPUT=`lein test`
if [[ ! $TEST_TEXT =~ "$TEST_OUTPUT" ]]; then
echo "lein test check failed"
exit 1
fi
POM_TEXT="Wrote /tmp/foo/pom.xml"
POM_OUTPUT=`lein pom`
if [[ ! $POM_TEXT =~ "$POM_OUTPUT" ]]; then
echo "lein pom check failed"
exit 1
fi
CHECK_TEXT="Compiling namespace foobar.core"
CHECK_OUTPUT=`lein check`
if [[ ! $CHECK_TEXT =~ "$CHECK_OUTPUT" ]]; then
echo "lein check check failed"
exit 1
fi
UBERJAR_TEXT=<<EOF
Compiling foobar.core
Created /debian/foobar/target/uberjar/foobar-0.1.0-SNAPSHOT.jar
Created /debian/foobar/target/uberjar/foobar-0.1.0-SNAPSHOT-standalone.jar
EOF
UBERJAR_OUTPUT=`lein uberjar`
if [[ ! $UBERJAR_TEXT =~ "$UBERJAR_OUTPUT" ]]; then
echo "lein uberjar check failed"
exit 1
fi
Tests failed.'
TEST_OUTPUT=`lein test 2>&1`
_check_task "$TEST_TEXT" "$TEST_OUTPUT"
POM_TEXT="Wrote /tmp/lein-test/pom.xml"
POM_OUTPUT=`lein pom 2>&1`
_check_task "$POM_TEXT" "$POM_OUTPUT"
CHECK_TEXT="Compiling namespace lein-test.core"
CHECK_OUTPUT=`lein check 2>&1`
_check_task "$CHECK_TEXT" "$CHECK_OUTPUT"
UBERJAR_TEXT='Compiling lein-test.core
Created /tmp/lein-test/target/uberjar/lein-test-0.1.0-SNAPSHOT.jar
Created /tmp/lein-test/target/uberjar/lein-test-0.1.0-SNAPSHOT-standalone.jar'
UBERJAR_OUTPUT=`lein uberjar 2>&1`
_check_task "$UBERJAR_TEXT" "$UBERJAR_OUTPUT"
cd /tmp
rm -r /tmp/foo
rm -r /tmp/lein-test
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment