Commit 03837f48 authored by legoc's avatar legoc

Renamed test VeryFast

parent f2178f22
......@@ -32,6 +32,11 @@ target_link_libraries(simple PUBLIC cameo zmq)
add_executable(testsimple src/tests/TestSimple.cpp)
target_link_libraries(testsimple PUBLIC cameo zmq)
add_executable(veryfast src/tests/VeryFast.cpp)
target_link_libraries(veryfast PUBLIC cameo zmq)
add_executable(testveryfast src/tests/TestVeryFast.cpp)
target_link_libraries(testveryfast PUBLIC cameo zmq)
......@@ -42,8 +47,6 @@ target_link_libraries(openport PUBLIC cameo zmq)
add_executable(testcameo src/tests/Test.cpp)
target_link_libraries(testcameo PUBLIC cameo zmq)
add_executable(testveryfast src/tests/TestVeryFast.cpp)
target_link_libraries(testveryfast PUBLIC cameo zmq)
add_executable(testbadendpoint src/tests/TestBadEndpoint.cpp)
......@@ -85,8 +88,6 @@ target_link_libraries(teststop PUBLIC cameo zmq)
add_executable(teststartwithstop src/tests/TestStartWithStopApplication.cpp)
target_link_libraries(teststartwithstop PUBLIC cameo zmq)
add_executable(teststartwithveryfast src/tests/TestStartWithVeryFastApplication.cpp)
target_link_libraries(teststartwithveryfast PUBLIC cameo zmq)
add_executable(testerror src/tests/TestErrorApplication.cpp)
target_link_libraries(testerror PUBLIC cameo zmq)
......
......@@ -133,7 +133,7 @@ public class TestSelector {
if (appName.equals("all")) {
apps.add("testsimplejava");
apps.add("startveryfastjava");
apps.add("testveryfastjava");
apps.add("startstopjava");
apps.add("startresjava");
apps.add("starterrorjava");
......@@ -145,7 +145,7 @@ public class TestSelector {
apps.add("canceljava");
apps.add("testsimplecpp");
apps.add("startveryfastcpp");
apps.add("testveryfastcpp");
apps.add("startstopcpp");
apps.add("startrescpp");
apps.add("starterrorcpp");
......@@ -159,7 +159,7 @@ public class TestSelector {
}
else if (appName.equals("java")) {
apps.add("testsimplejava");
apps.add("startveryfastjava");
apps.add("testveryfastjava");
apps.add("startstopjava");
apps.add("startresjava");
apps.add("starterrorjava");
......@@ -172,7 +172,7 @@ public class TestSelector {
}
else if (appName.equals("cpp")) {
apps.add("testsimplecpp");
apps.add("startveryfastcpp");
apps.add("testveryfastcpp");
apps.add("startstopcpp");
apps.add("startrescpp");
apps.add("starterrorcpp");
......@@ -184,6 +184,7 @@ public class TestSelector {
}
else if (appName.equals("python")) {
apps.add("testsimplepy");
apps.add("testveryfastpy");
}
else {
apps.add(appName);
......
......@@ -23,7 +23,7 @@ import fr.ill.ics.cameo.Option;
import fr.ill.ics.cameo.Server;
public class TestStartWithVeryFastApplication {
public class TestVeryFast {
public static void main(String[] args) {
......@@ -48,7 +48,7 @@ public class TestStartWithVeryFastApplication {
// the getString is blocking until the application finishes
application.waitFor();
System.out.println("finished application " + application + " with code " + application.getExitCode());
System.out.println("Finished application " + application + " with code " + application.getExitCode());
}
} finally {
......@@ -56,7 +56,7 @@ public class TestStartWithVeryFastApplication {
Application.This.terminate();
}
System.out.println("finished the application after " + ((new Date()).getTime() - d.getTime()) + "ms");
System.out.println("Finished the application after " + ((new Date()).getTime() - d.getTime()) + "ms");
}
}
\ No newline at end of file
......@@ -17,7 +17,7 @@
package fr.ill.ics.cameo.test;
public class VeryFastApplication {
public class VeryFast {
public static void main(String[] args) {
}
......
......@@ -41,12 +41,16 @@
<start executable="java" args="-classpath cameo-tests-jzmq/target/cameo-tests-jzmq-full.jar fr.ill.ics.cameo.test.TestSimple"/>
</application>
<application name="veryfastjava" starting_time="0" stopping_time="0" output_stream="yes" multiple="no" restart="no" info_arg="no">
<start executable="java" args="-classpath cameo-tests-jzmq/target/cameo-tests-jzmq-full.jar fr.ill.ics.cameo.test.VeryFast"/>
</application>
<application name="testveryfastjava" starting_time="0" stopping_time="1" output_stream="yes" multiple="no" restart="no">
<start executable="java" args="-classpath cameo-tests-jzmq/target/cameo-tests-jzmq-full.jar fr.ill.ics.cameo.test.TestVeryFast"/>
</application>
<application name="veryfastjava" starting_time="0" stopping_time="0" output_stream="yes" multiple="no" restart="no" info_arg="no">
<start executable="java" args="-classpath cameo-tests-jzmq/target/cameo-tests-jzmq-full.jar fr.ill.ics.cameo.test.VeryFastApplication"/>
</application>
<application name="errorjava" starting_time="0" stopping_time="1" multiple="no" restart="no" info_arg="no">
<start executable="java" args="-classpath cameo-tests-jzmq/target/cameo-tests-jzmq-full.jar fr.ill.ics.cameo.test.TestErrorApplication"/>
......@@ -92,10 +96,6 @@
<start executable="java" args="-classpath cameo-tests-jzmq/target/cameo-tests-jzmq-full.jar fr.ill.ics.cameo.test.TestStorageApplication"/>
</application>
<application name="startveryfastjava" starting_time="0" stopping_time="1" output_stream="yes" multiple="no" restart="no">
<start executable="java" args="-classpath cameo-tests-jzmq/target/cameo-tests-jzmq-full.jar fr.ill.ics.cameo.test.TestStartWithVeryFastApplication"/>
</application>
<application name="resjava" starting_time="0" stopping_time="1" output_stream="yes" log_directory="logs" multiple="no" restart="no">
<start executable="java" args="-classpath cameo-tests-jzmq/target/cameo-tests-jzmq-full.jar fr.ill.ics.cameo.test.TestResultApplication"/>
</application>
......@@ -194,12 +194,18 @@
<start executable="testsimple"/>
</application>
<application name="veryfastcpp" starting_time="0" stopping_time="1" output_stream="yes" log_directory="logs" multiple="no" restart="no">
<start executable="veryfast"/>
</application>
<application name="testveryfastcpp" starting_time="0" stopping_time="1" output_stream="yes" multiple="no" restart="no">
<start executable="testveryfast"/>
</application>
<application name="errorcpp" starting_time="inf" stopping_time="1" output_stream="yes" log_directory="logs" multiple="no" restart="no">
<start executable="testerror"/>
</application>
......@@ -252,10 +258,6 @@
<start executable="teststop"/>
</application>
<application name="startveryfastcpp" starting_time="0" stopping_time="1" output_stream="yes" multiple="no" restart="no">
<start executable="teststartwithveryfast"/>
</application>
<application name="startstopcpp" starting_time="0" stopping_time="1" output_stream="yes" multiple="no" restart="no">
<start executable="teststartwithstop"/>
</application>
......@@ -354,6 +356,16 @@
<start executable="testsimple.py"/>
</application>
<application name="veryfastpy" starting_time="0" stopping_time="1" output_stream="yes" log_directory="logs" multiple="no" restart="no">
<start executable="veryfast.py"/>
</application>
<application name="testveryfastpy" starting_time="0" stopping_time="1" output_stream="yes" log_directory="logs" multiple="no" restart="no">
<start executable="testveryfast.py"/>
</application>
<application name="startstoppy" starting_time="0" stopping_time="1" output_stream="yes" log_directory="logs" multiple="no" restart="no">
<start executable="startstop.py"/>
</application>
......
......@@ -11,7 +11,7 @@ this.init(sys.argv)
server = this.getServer()
for i in range(numberOfTimes):
app = server.start("simplepy", 0)
app = server.start("veryfastpy", 0)
state = app.waitFor()
print("Finished the application", app.getNameId(),
"with state", state,
......
#!/usr/bin/python3 -u
import sys
import cameopy
numberOfTimes = 1 if len(sys.argv) < 3 else int(sys.argv[1])
print("Number of times:", numberOfTimes)
this = cameopy.This
this.init(sys.argv)
server = this.getServer()
for i in range(numberOfTimes):
app = server.start("simplepy", 0)
state = app.waitFor()
print("Finished the application", app.getNameId(),
"with state", state,
"and code", app.getExitCode()
)
#!/usr/bin/python3 -u
print("Finished the application")
/*
* Copyright 2015 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
int main(int argc, char *argv[]) {
return 0;
}
/*
* Copyright 2015 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <cameo/cameo.h>
using namespace std;
using namespace cameo;
int main(int argc, char *argv[]) {
int numberOfTimes = 1;
if (argc > 2) {
numberOfTimes = stoi(argv[1]);
}
application::This::init(argc, argv);
// The start function must be called into a block to ensure the destructor of Instance is called before This::terminate()
{
Server& server = application::This::getServer();
// loop the number of times.
for (int i = 0; i < numberOfTimes; ++i) {
// start the application.
unique_ptr<application::Instance> app = server.start("veryfastcpp", OUTPUTSTREAM);
application::State state = app->waitFor();
cout << "Finished the application " << *app << " with state " << application::toString(state) << " and code " << app->getExitCode() << endl;
}
}
return 0;
}
/*
* Copyright 2015 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <cameo/cameo.h>
using namespace std;
using namespace cameo;
int main(int argc, char *argv[]) {
int numberOfTimes = 1;
if (argc > 2) {
numberOfTimes = stoi(argv[1]);
}
application::This::init(argc, argv);
// The start function must be called into a block to ensure the destructor of Instance is called before This::terminate()
{
Server& server = application::This::getServer();
// loop the number of times.
for (int i = 0; i < numberOfTimes; ++i) {
// start the application.
unique_ptr<application::Instance> app = server.start("veryfastcpp", OUTPUTSTREAM);
application::State state = app->waitFor();
cout << "finished the application " << *app << " with state " << application::toString(state) << " and code " << app->getExitCode() << endl;
}
}
return 0;
}
/*
* Copyright 2015 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
int main(int argc, char *argv[]) {
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment