Permalink
Browse files

Make the test work from inside a new plenv

  • Loading branch information...
1 parent 5abe3df commit c089d8c178a068a3027be44186dab8ceaa37ee5a @ingydotnet ingydotnet committed Sep 17, 2013
Showing with 16 additions and 2 deletions.
  1. +16 −2 Makefile
View
@@ -1,10 +1,24 @@
+DUMMY_VERSION = $(PWD)/versions/dummy
+
+PLENV_ROOT := $(PWD)
+PATH := $(PWD)/bin:$(PATH)
+SHELL := /bin/bash
+export PLENV_ROOT PATH SHELL
+
copy-from-rbenv:
bash ./author/copy-from-rbenv.sh
-test: ext/test-simple-bash _force
- prove -v test/
+test: ext/test-simple-bash shims/perl _force
+ ( eval "$$(plenv init -)"; eval prove -v test/ )
ext/test-simple-bash:
git clone https://github.com/ingydotnet/test-simple-bash.git $@
+shims/perl:
+ mkdir -p $(DUMMY_VERSION)/bin
+ touch $(DUMMY_VERSION)/bin/perl
+ ( eval "$$(plenv init -)"; plenv rehash )
+ rm -fr $(DUMMY_VERSION)
+ [ -e $@ ] || exit 1
+
_force:

0 comments on commit c089d8c

Please sign in to comment.