commit 731ccb8c2dd7949557a67b5830a9291a4491cc28
parent 8bf86b63b02c390eaad010ac0c16c38df8b6d46a
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Mon, 4 Apr 2016 21:31:20 -0600
e2e: these tests are end to end
Diffstat:
A | e2e/vim.t | | | 55 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
D | tt/vim.t | | | 54 | ------------------------------------------------------ |
2 files changed, 55 insertions(+), 54 deletions(-)
diff --git a/e2e/vim.t b/e2e/vim.t
@@ -0,0 +1,55 @@
+use strict;
+use SCV::Project;
+use SCV::Viewer;
+use Test::More tests => 7;
+use Time::HiRes qw( time );
+
+#
+# This uses tools installed from a package, not the in tree build!
+#
+
+my $viewer = SCV::Viewer->new();
+my $project = SCV::Project->new();
+
+my $tmpdir = $project->get_tmpdir();
+
+my $vim_src = "ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2";
+is( system("cd $tmpdir && curl -O $vim_src"), 0, "download" );
+is( system("cd $tmpdir && tar xjf vim-7.4.tar.bz2"), 0, "extract" );
+
+is( system("make -C $tmpdir/vim74/src scratch"), 0, "make scratch" );
+# LDADD variable does not get picked up by auto conf, use LIBS instread
+is( system("citrun_wrap make -C $tmpdir/vim74/src config LDFLAGS=-L/usr/local/lib LIBS=-lcitrun"), 0, "make config" );
+is( system("rm $tmpdir/vim74/src/SRC_NUMBER"), 0, "rm SRC_NUMBER" );
+is( system("citrun_wrap make -C $tmpdir/vim74/src myself"), 0, "make myself" );
+
+# Launch the newly compiled programs and make sure the runtime is communicating
+$project->{prog_name} = "vim74/src/vim";
+$project->run();
+
+$viewer->accept();
+
+my $runtime_metadata = $viewer->get_metadata();
+is( $runtime_metadata->{num_tus}, 55, "translation unit count" );
+# is( $runtime_metadata->{pid}, 5, "" );
+# is( $runtime_metadata->{ppid}, 5, "" );
+# is( $runtime_metadata->{pgrp}, 5, "" );
+
+my $tus = $runtime_metadata->{tus};
+for (@$tus) {
+ print STDERR "$_->{filename}, $_->{lines} lines, $_->{inst_sites} inst sites\n";
+}
+
+print STDERR ">>> START\n";
+# Lets see how long it takes to do 60 data calls
+for (1..60) {
+ my $data1 = $viewer->get_execution_data($tus);
+}
+print STDERR ">>> END\n";
+
+$project->kill();
+$project->wait();
+
+#$ENV{CITRUN_SOCKET} = "$cwd/SCV::Viewer.socket";
+# Check that the native test suite can pass with instrumented binaries
+#is( system("make -C $tmpdir/vim74/src test"), 0, "make test" );
diff --git a/tt/vim.t b/tt/vim.t
@@ -1,54 +0,0 @@
-use strict;
-use Cwd;
-use SCV::Project;
-use SCV::Viewer;
-use Test::More tests => 7;
-use Time::HiRes qw( time );
-
-my $viewer = SCV::Viewer->new();
-my $project = SCV::Project->new();
-
-my $cwd = getcwd;
-my $tmpdir = $project->get_tmpdir();
-
-my $vim_src = "ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2";
-is( system("cd $tmpdir && curl -O $vim_src"), 0, "download" );
-is( system("cd $tmpdir && tar xjf vim-7.4.tar.bz2"), 0, "extract" );
-
-my $scv_wrap = "wrap/scv_wrap";
-is( system("make -C $tmpdir/vim74/src scratch"), 0, "make scratch" );
-# LDADD variable does not get picked up by auto conf, use LIBS instread
-is( system("$scv_wrap make -C $tmpdir/vim74/src config LIBS=-lscv"), 0, "make config" );
-is( system("rm $tmpdir/vim74/src/SRC_NUMBER"), 0, "rm SRC_NUMBER" );
-is( system("$scv_wrap make -C $tmpdir/vim74/src myself"), 0, "make myself" );
-
-# Launch the newly compiled programs and make sure the runtime is communicating
-$project->{prog_name} = "vim74/src/vim";
-$project->run();
-
-$viewer->accept();
-
-my $runtime_metadata = $viewer->get_metadata();
-is( $runtime_metadata->{num_tus}, 55, "translation unit count" );
-# is( $runtime_metadata->{pid}, 5, "" );
-# is( $runtime_metadata->{ppid}, 5, "" );
-# is( $runtime_metadata->{pgrp}, 5, "" );
-
-my $tus = $runtime_metadata->{tus};
-for (@$tus) {
- print STDERR "$_->{filename}, $_->{lines} lines, $_->{inst_sites} inst sites\n";
-}
-
-print STDERR ">>> START\n";
-# Lets see how long it takes to do 60 data calls
-for (1..60) {
- my $data1 = $viewer->get_execution_data($tus);
-}
-print STDERR ">>> END\n";
-
-$project->kill();
-$project->wait();
-
-#$ENV{CITRUN_SOCKET} = "$cwd/SCV::Viewer.socket";
-# Check that the native test suite can pass with instrumented binaries
-#is( system("make -C $tmpdir/vim74/src test"), 0, "make test" );