Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Delete t/run_test and friends. We do not need that since test files a…

…re stand-alone and do not need to be run from a harness-like environment
  • Loading branch information...
commit d57e185c1403f2661d48d6447a4f90c91e24dad6 1 parent e5f8fdf
@Whiteknight authored
Showing with 1 addition and 126 deletions.
  1. +1 −1  setup.nqp
  2. +0 −29 t/run_test
  3. +0 −69 t/run_test.nqp
  4. +0 −27 t/run_test.pir
View
2  setup.nqp
@@ -64,7 +64,7 @@ sub setup_test_manifest(%PLA) {
}
sub setup_smolder(%PLA) {
- %PLA{'prove_exec'} := 'parrot-nqp t/run_test.nqp';
+ %PLA{'prove_exec'} := 'parrot-nqp';
%PLA{'smolder_url'} :=
'http://smolder.parrot.org/app/projects/process_add_report/2';
%PLA{'smolder_credentials'} := 'parrot-autobot:qa_rocks';
View
29 t/run_test
@@ -1,29 +0,0 @@
-#! parrot-nqp
-our @ARGS;
-main(@ARGS);
-
-INIT {
- pir::load_bytecode('./library/kakapo_full.pbc');
- Nqp::compile_file('t/testlib/matrixtest.nqp');
- pir::loadlib__ps("./linalg_group");
-}
-
-#class MyProgram is Program {
- method main(*@args) {
- #for @args {
- my $sub := Nqp::compile_file("t/pmc/nummatrix2d.t");
- $sub[0]();
- #}
- }
-#}
-
-#INIT {
- #Program::instance(
- # MyProgram.new( :from_parrot )
- #);
-#}
-
-#Program::instance().run;
-
-
-
View
69 t/run_test.nqp
@@ -1,69 +0,0 @@
-#! parrot-nqp
-INIT {
- pir::load_bytecode('rosella/test.pbc');
- pir::load_bytecode('t/testlib/pla_test.pbc');
-}
-
-my $interp := pir::getinterp__P();
-my @argv := $interp[2];
-MAIN(@argv);
-
-sub MAIN(@argv) {
- my $test := @argv.shift;
- if $test ne 't/sanity.t' {
- my $pla := pir::loadlib__ps("./dynext/linalg_group");
- }
- compile_and_execute($test);
-}
-
-sub is_pir_test($filename) {
- my $idx := pir::index__ISS($filename, 't/pir');
- if $idx == 0 {
- return 1;
- }
- return 0;
-}
-
-sub compile_pir_test($filename) {
- my $sub;
- Q:PIR {
- $P1 = find_lex "$filename"
- $P0 = new ['FileHandle']
- $P0.'open'($P1)
- $P2 = $P0.'readall'()
- $P0.'close'()
- $P3 = compreg 'PIR'
- $P4 = $P3($P2)
- $P4 = $P4[0]
- store_lex '$sub', $P4
- };
- return $sub;
-}
-
-sub compile_nqp_test($filename) {
- my $nqp := pir::compreg__PS("NQP-rx");
- my $fh := pir::new__PS("FileHandle");
- $fh.open($filename);
- my $code := $fh.readall();
- $fh.close();
- my $sub := $nqp.compile($code);
- return $sub[0];
-}
-
-sub compile_and_execute($filename) {
- my $sub;
- my $pirfile := is_pir_test($filename);
- if $pirfile == 0 {
- $sub := compile_nqp_test($filename);
- } else {
- $sub := compile_pir_test($filename);
- }
- try {
- $sub();
- CATCH {
- pir::say($!);
- pir::say(pir::join('\n', $!.backtrace_strings()));
- # WAT DO?
- }
- }
-}
View
27 t/run_test.pir
@@ -1,27 +0,0 @@
-
-.sub "" :load :init
- load_bytecode "nqp-rx.pbc"
- load_bytecode "./library/kakapo_full.pbc"
- load_bytecode "t/testlib/pla_test.pbc"
- loadlib $P33, "./linalg_group"
-.end
-
-.sub "main" :main
- .param pmc args
- $P0 = shift args
- .local pmc args_iter
- .local pmc testfile
- args_iter = iter args
- #$S0 = "t/pmc/"
- loop_top:
- unless args_iter goto file_end
- testfile = shift args_iter
- $P0 = get_hll_global ["Nqp"], "compile_file"
- $S1 = testfile
- #$S2 = $S0 . $S1
- $P1 = $P0($S1)
- $P2 = $P1[0]
- $P2()
- goto loop_top
- file_end:
-.end
Please sign in to comment.
Something went wrong with that request. Please try again.