ctf: Update the script that downloads test traces
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 27 Apr 2012 17:11:02 +0000 (13:11 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 27 Apr 2012 17:13:25 +0000 (13:13 -0400)
Centralize all the CTF traces under the CTF plugin. Also simplified
the script a bit, and updated the locations.

Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
org.eclipse.linuxtools.ctf.core.tests/.classpath
org.eclipse.linuxtools.ctf.core.tests/.gitignore
org.eclipse.linuxtools.ctf.core.tests/Tests/traces/.gitignore [deleted file]
org.eclipse.linuxtools.ctf.core.tests/Tests/traces/gen.sh [deleted file]
org.eclipse.linuxtools.ctf.core.tests/Tests/traces/trace100m.sh [deleted file]
org.eclipse.linuxtools.ctf.core.tests/Tests/traces/trace20m.sh [deleted file]
org.eclipse.linuxtools.ctf.core.tests/build.properties
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/TestParams.java
org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore [new file with mode: 0644]
org.eclipse.linuxtools.ctf.core.tests/traces/get-traces.sh [new file with mode: 0755]

index f7868c5f53f629f1ad8d0065597debd8b7a835d9..4f029bac05d97e25fcbc65585daab139c3bfc218 100644 (file)
@@ -3,7 +3,6 @@
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="Tests"/>
        <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.linuxtools.ctf.core"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
index a381466d18fe5e80e3c384676eb5f45b15dc24cb..8d94ef8debe45a7bc3866f985fdc60d41c12822f 100644 (file)
@@ -3,4 +3,3 @@ bin
 javaCompiler...args
 build.xml
 target
-Tests/traces
diff --git a/org.eclipse.linuxtools.ctf.core.tests/Tests/traces/.gitignore b/org.eclipse.linuxtools.ctf.core.tests/Tests/traces/.gitignore
deleted file mode 100644 (file)
index 60a0fcc..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/kernel-1
-/kernel-3
-/trace20m
-/kernel.txt
-/kernel-2
diff --git a/org.eclipse.linuxtools.ctf.core.tests/Tests/traces/gen.sh b/org.eclipse.linuxtools.ctf.core.tests/Tests/traces/gen.sh
deleted file mode 100755 (executable)
index ad503f9..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/bash
-
-if [ $EUID -ne 0 ]
-then
-       echo "Must be run as root"
-       exit
-fi
-
-if [ $# -ne 2 ]
-then
-       echo "Need 2 arguments, the output folder and the size in MB.";
-       exit
-fi
-
-path=$1
-size=$2
-
-if [ -d $path ]; then
-       echo "Directory already exists, aborting."
-       exit 1
-fi
-
-lttng create -o "$path"
-
-lttng enable-event -k -a
-
-lttng start
-
-echo "Trace started. Do something to generate events."
-
-while [ $(du --summarize "$path" | cut -f 1) -lt $(($size * 1024)) ]
-do
-       sleep 1
-done
-
-lttng stop
-
-lttng destroy
-
-echo "Final size : " $(du -sh $path)
-
-if [ -n "$SUDO_USER" ]; then
-       user=$SUDO_USER
-       group=$(id -ng $user)
-       
-       while true; do
-               read -p "Do 'chown -Rv $user:$group $path' ? [y/n]" yesno
-               case $yesno in
-                       [Yy]* )
-                               chown -Rv $user:$group $path
-                               break;
-                               ;;
-                       [Nn]* )
-                               break;
-                               ;;
-               esac
-       done
-fi
-
diff --git a/org.eclipse.linuxtools.ctf.core.tests/Tests/traces/trace100m.sh b/org.eclipse.linuxtools.ctf.core.tests/Tests/traces/trace100m.sh
deleted file mode 100755 (executable)
index 5b3da1f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wget http://nova.polymtl.ca/~simark/trace100m.tgz -O-  | tar -xvzf - 
diff --git a/org.eclipse.linuxtools.ctf.core.tests/Tests/traces/trace20m.sh b/org.eclipse.linuxtools.ctf.core.tests/Tests/traces/trace20m.sh
deleted file mode 100755 (executable)
index 79ad1eb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wget http://nova.polymtl.ca/~simark/trace20m.tgz -O-  | tar -xvzf - 
index 18246ef892a219e5ec04ded189701b724fe57537..493432fbf26e94c5536c3f1079e93a2100dbc6e7 100644 (file)
@@ -1,3 +1,3 @@
 bin.includes = META-INF/,\
                plugin.properties,\
-               Tests/
+               traces/
index 92524979fb5d5319f31d632dbc90de9a2102f493..5f2f9c6760264ef504a4b0c792917dbdc743679a 100644 (file)
@@ -13,8 +13,11 @@ import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
  */
 public abstract class TestParams {
 
-    /* Path to test traces */
-    private static final String testTracePath1 = "Tests/traces/trace20m1"; //$NON-NLS-1$
+    /*
+     * Path to test traces. Make sure you run the traces/get-traces.sh script
+     * first!
+     */
+    private static final String testTracePath1 = "traces/kernel"; //$NON-NLS-1$
     private static CTFTrace testTrace1 = null;
     private static CTFTrace testTraceFromFile1 = null;
 
diff --git a/org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore b/org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore
new file mode 100644 (file)
index 0000000..6c4dbbf
--- /dev/null
@@ -0,0 +1,2 @@
+/kernel
+/trace2
diff --git a/org.eclipse.linuxtools.ctf.core.tests/traces/get-traces.sh b/org.eclipse.linuxtools.ctf.core.tests/traces/get-traces.sh
new file mode 100755 (executable)
index 0000000..95a1d34
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+#This small script will download the traces needed to run some tests.
+
+# Trace used by the CTF plugin unit tests
+wget http://lttng.org/files/samples/sample-ctf-trace-20120412.tar.bz2 -O-  | tar xvjf - &&
+
+# Trace used by the lttng2 kernel state provider tests
+wget http://www.dorsal.polymtl.ca/~alexmont/data/trace2.tar.bz2 -O- | tar xvjf -
This page took 0.034259 seconds and 5 git commands to generate.