Permalink
Browse files

Start work towards making the happy pandas less manual and run on mul…

…tiple machines
  • Loading branch information...
1 parent f038fdc commit 48de3b90b575a914ab0e33b29fa2a3539c5df12c @holdenk committed Nov 6, 2012
View
7 Unicorn/Cpp.pm
@@ -3,7 +3,7 @@ use strict;
use File::Basename;
use File::Slurp qw (slurp);
-my $spatchexec = "/usr/bin/spatch";
+my $spatchexec = "spatch";
my $spatchdir = "cpp_semantic";
sub check_cpp {
@@ -19,8 +19,9 @@ sub fix_cpp {
while (my $spatch_file = readdir($spatch_files)) {
chomp ($spatch_file);
if (-f $spatchdir."/".$spatch_file && $spatch_file =~ /\.cocci$/) {
- print "running spatch $spatchdir/$spatch_file";
- `$spatchexec --in-place --sp-file $spatchdir/$spatch_file $file`;
+ print "running spatch $spatchdir/$spatch_file $file\n";
+ print "got:\n";
+ print `$spatchexec --in-place --sp-file $spatchdir/$spatch_file $file`;
}
}
closedir($spatch_files);
View
3 bigquerytargets.pl
@@ -0,0 +1,3 @@
+# Gets top repos from gitarchive.org
+# Please run a bigtable query beforehand to make sure you have bq credentials setup
+`bq --project_id holdensmagicalunicorn query
View
8 bigtablequery.bq
@@ -0,0 +1,8 @@
+/* top 15000 repos for C++ by number of pushes */
+SELECT repository_name, count(repository_name) as pushes, repository_description, repository_url
+FROM [githubarchive:github.timeline]
+WHERE type="PushEvent"
+AND (repository_language="C++")
+GROUP BY repository_name, repository_description, repository_url
+ORDER BY pushes DESC
+LIMIT 15000;
View
3 cpp_semantic/deprecated_getwd.cocci
@@ -5,5 +5,4 @@ int y;
@@
char x[y];
- getwd(x);
-+ getcwd(x,y);
-@@
++ getcwd(x,y);
View
4 cpp_semantic/memcpy_null.cocci
@@ -6,5 +6,5 @@
function memcpy;
identifier x;
@@
--memcpy(x, NULL, 0)
-+
+-memcpy(x, 0, 0);
++x;
View
7 main.pl
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+# The purpose of this is to turn the entire pipeline, possibly on multiple machines
+# First step is to get the list of projects to consider which runs on a single host
+# but we don't have to block on it
+open (BINGTARGETS , "perl targets.pl| tee bingtargets |");
+open (GHTARGETS, "perl targets2.pl| tee ghtargets |");
+open (BQTARGETS, "perl bigquerytargets.pl| tee bqtargets|");
View
7 t/cpp_expected/deprecated_min_max_with_alg.cpp
@@ -0,0 +1,7 @@
+#include <algorithm>
+#include <iostream>
+
+int main() {
+ std::cout << (std::min(1, 2)) << endl;
+ return 0;
+}
View
2 targets.pl
@@ -35,7 +35,7 @@
my $response = $search->search();
foreach my $result ( @{$response->results} ) {
- print $result->Title, " -> ", $result->Url, "\n";
+ print $result->Url, "\n";
}
$offset += $inc;
}

0 comments on commit 48de3b9

Please sign in to comment.