Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Commit

Permalink
rewrite tests in PIR (from Perl)
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Nov 16, 2009
1 parent 12330b2 commit 1e32a62
Show file tree
Hide file tree
Showing 21 changed files with 1,784 additions and 690 deletions.
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,5 @@ dynext/pmc/*.o
dynext/pmc/*.obj
dynext/pmc/*.pdb

t/*.out
t/*.pbc
t/*.pir
t/*.wmls
t/*.wmlsc
test_*.wmls
test_*.wmlsc
14 changes: 5 additions & 9 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ help:
@echo ""

test: all
$(PERL) t/harness
prove --exec=$(PARROT) t/pmc//*.t t//*.t

pmctest: build
prove --exec=$(PARROT) t/pmc//*.t
Expand All @@ -157,9 +157,8 @@ codetest: codetest-c codetest-make codetest-perl codetest-pir codetest-pod

T_C := dynext//pmc//*.pmc dynext//ops//*.ops
T_MAKE := Makefile.in dynext//ops//Makefile.in dynext//pmc//Makefile.in
T_PERL := t//harness t//*.t t//Parrot//Test//*.pm \
build//*.pl build//SRM//*.pm
T_PIR := *.pir wmlscript//*.pir wmlscript//library//*.pir t//pmc//*.t
T_PERL := build//*.pl build//SRM//*.pm
T_PIR := *.pir wmlscript//*.pir wmlscript//library//*.pir t//*.pir t//*.t t//pmc//*.t
T_POD := doc//*.pod

codetest-c:
Expand Down Expand Up @@ -249,11 +248,8 @@ win32-inno-installer: installable
iscc parrot-wmlscript.iss

TEST_CLEANERS := \
"t/*.pir" \
"t/*.pbc" \
"t/*.wmls" \
"t/*.wmlsc" \
"t/*.out"
"test_*.wmls" \
"test_*.wmlsc"

testclean:
$(RM_F) $(TEST_CLEANERS)
Expand Down
13 changes: 12 additions & 1 deletion setup.pir
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ No Configure step, no Makefile generated.
.const 'Sub' clean = 'clean'
register_step_before('clean', clean)

.const 'Sub' testclean = 'testclean'
register_step_after('test', testclean)
register_step_after('clean', testclean)

.const 'Sub' pmctest = 'pmctest'
register_step('pmctest', pmctest)

Expand Down Expand Up @@ -74,7 +78,9 @@ SOURCES
$P0['installable_pbc'] = $P6

# test
$P0['harness_files'] = ''
$S0 = get_parrot()
$P0['prove_exec'] = $S0
$P0['prove_files'] = 't/pmc/*.t t/*.t'

# install
$P7 = split "\n", <<'LIBS'
Expand Down Expand Up @@ -127,6 +133,11 @@ SOURCES
unlink('wmlscript/stdlibs.pir')
.end

.sub 'testclean' :anon
.param pmc kv :slurpy :named
system("perl -MExtUtils::Command -e rm_f test_*.wmls test_*.wmlsc")
.end

.sub 'pmctest' :anon
.param pmc kv :slurpy :named
run_step('build', kv :flat :named)
Expand Down
117 changes: 0 additions & 117 deletions t/Parrot/Test/WMLScript.pm

This file was deleted.

Loading

0 comments on commit 1e32a62

Please sign in to comment.