summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2016-04-10 08:39:36 -0700
committerSean Whitton <spwhitton@spwhitton.name>2016-04-10 08:39:36 -0700
commitdea2461c5e3584f320f0f8199eea2d0d29a38a4f (patch)
tree7bd2e255338a8915a9e476f48d507f897f0136a7
parent75aa877e34490f6986223516a527fefeab15ed90 (diff)
add some stuff to the load-path & reorder code
-rwxr-xr-xdh_elpa_test20
1 files changed, 15 insertions, 5 deletions
diff --git a/dh_elpa_test b/dh_elpa_test
index b7c289e..83561c2 100755
--- a/dh_elpa_test
+++ b/dh_elpa_test
@@ -138,16 +138,26 @@ if (@ert_files) {
push @args, ("-L", "/usr/share/emacs/site-lisp/dash-el")
if ($control->source->Build_Depends->has( "dash-el" ));
- push @args, ("--eval", "$ENV{'DH_ELPA_TEST_ERT_EVAL'}")
- if (defined $ENV{'DH_ELPA_TEST_ERT_EVAL'});
- foreach my $ert_file (@ert_files) {
- push @args, ("-l", "$ert_file");
- }
+ # add the user's load-path entries
if (defined $ENV{'DH_ELPA_TEST_ERT_LOAD_PATH'}) {
foreach my $dir (split(',', $ENV{'DH_ELPA_TEST_ERT_LOAD_PATH'})) {
push @args, ('-L', "$dir");
}
}
+
+ # make some guesses about where stuff that needs to be in
+ # load-path will be
+ push @args, ("-L", ".");
+ push @args, ("-L", "test") if ( -d "test" );
+ push @args, ("-L", "tests") if ( -d "tests" );
+ # TODO maybe we should just add all dirs containing files in @ert_files?
+
+ # now finish adding the user's stuff
+ push @args, ("--eval", "$ENV{'DH_ELPA_TEST_ERT_EVAL'}")
+ if (defined $ENV{'DH_ELPA_TEST_ERT_EVAL'});
+ foreach my $ert_file (@ert_files) {
+ push @args, ("-l", "$ert_file");
+ }
if (defined $ENV{'DH_ELPA_TEST_ERT_HELPER'}) {
push @args, ("-l", "$ENV{'DH_ELPA_TEST_ERT_HELPER'}");
} else {