Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
cameo-tests
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Cameo
cameo-tests
Commits
d1f43974
Commit
d1f43974
authored
Oct 01, 2020
by
legoc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests updated for stream review
parent
1a029040
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
170 additions
and
16 deletions
+170
-16
jeromq-api-config.xml
jeromq-api-config.xml
+6
-2
jzmq-api-config.xml
jzmq-api-config.xml
+7
-3
jzmq-win-api-config.xml
jzmq-win-api-config.xml
+8
-0
src/Makefile.am
src/Makefile.am
+15
-6
src/TestFastStream.cpp
src/TestFastStream.cpp
+54
-0
src/TestInputStream.cpp
src/TestInputStream.cpp
+7
-5
src/main/java/fr/ill/ics/cameo/test/TestProcessStream.java
src/main/java/fr/ill/ics/cameo/test/TestProcessStream.java
+73
-0
No files found.
jeromq-api-config.xml
View file @
d1f43974
...
...
@@ -217,8 +217,12 @@
<start
executable=
"build/bin/testconnectionchecker"
/>
</application>
<application
name=
"veryfastcpp"
starting_time=
"0"
retries=
"0"
stopping_time=
"0"
stream=
"yes"
multiple=
"no"
restart=
"no"
>
<start
executable=
"build/bin/testveryfast"
/>
<application
name=
"faststreamcpp"
starting_time=
"0"
retries=
"0"
stopping_time=
"0"
stream=
"yes"
multiple=
"no"
restart=
"no"
>
<start
executable=
"build/bin/testfaststream"
/>
</application>
<application
name=
"inputstreamcpp"
starting_time=
"0"
retries=
"0"
stopping_time=
"0"
stream=
"yes"
multiple=
"no"
restart=
"no"
>
<start
executable=
"build/bin/testinputstream"
/>
</application>
<application
name=
"stoptimeoutcpp"
starting_time=
"0"
retries=
"0"
stopping_time=
"1"
stream=
"yes"
multiple=
"no"
restart=
"no"
>
...
...
jzmq-api-config.xml
View file @
d1f43974
...
...
@@ -225,8 +225,12 @@
<start
executable=
"build/bin/testconnectionchecker"
/>
</application>
<application
name=
"veryfastcpp"
starting_time=
"0"
retries=
"0"
stopping_time=
"0"
stream=
"yes"
multiple=
"no"
restart=
"no"
>
<start
executable=
"build/bin/testveryfast"
/>
<application
name=
"faststreamcpp"
starting_time=
"0"
retries=
"0"
stopping_time=
"0"
stream=
"yes"
multiple=
"no"
restart=
"no"
>
<start
executable=
"build/bin/testfaststream"
/>
</application>
<application
name=
"inputstreamcpp"
starting_time=
"0"
retries=
"0"
stopping_time=
"0"
stream=
"yes"
multiple=
"no"
restart=
"no"
>
<start
executable=
"build/bin/testinputstream"
/>
</application>
<application
name=
"stoptimeoutcpp"
starting_time=
"0"
retries=
"0"
stopping_time=
"1"
stream=
"yes"
multiple=
"no"
restart=
"no"
>
...
...
@@ -273,7 +277,7 @@
<application
name=
"requester-client"
starting_time=
"0"
retries=
"0"
stopping_time=
"1"
stream=
"yes"
log_directory=
"logs"
multiple=
"no"
restart=
"no"
>
<start
executable=
"build/bin/testrequesterclient"
/>
</application>
</applications>
</config>
jzmq-win-api-config.xml
View file @
d1f43974
...
...
@@ -170,6 +170,14 @@
<start
executable=
"msvc/x64/Release/reqrepcpp"
/>
</application>
<application
name=
"faststreamcpp"
starting_time=
"0"
retries=
"0"
stopping_time=
"0"
stream=
"yes"
multiple=
"no"
restart=
"no"
>
<start
executable=
"msvc/x64/Release/testfaststream"
/>
</application>
<application
name=
"inputstreamcpp"
starting_time=
"0"
retries=
"0"
stopping_time=
"0"
stream=
"yes"
multiple=
"no"
restart=
"no"
>
<start
executable=
"msvc/x64/Release/testinputstream"
/>
</application>
<application
name=
"startpubcpp"
starting_time=
"0"
retries=
"0"
stopping_time=
"1"
stream=
"yes"
multiple=
"no"
restart=
"no"
environment=
"win-environment.properties"
>
<start
executable=
"msvc/x64/Release/subpubcpp"
args=
"pubcpp"
/>
</application>
...
...
src/Makefile.am
View file @
d1f43974
...
...
@@ -23,7 +23,8 @@ bin_PROGRAMS = \
testcancel
\
testtimeout
\
testconnectionchecker
\
testveryfast
\
testfaststream
\
testinputstream
\
teststoptimeout
\
requesterclient
\
responderserver
\
...
...
@@ -211,12 +212,20 @@ testconnectionchecker_LDFLAGS = $(CT_LDFLAGS)
testconnectionchecker_LDADD
=
$(CT_LIBS)
test
veryfast
_SOURCES
=
\
Test
VeryFast
.cpp
test
faststream
_SOURCES
=
\
Test
FastStream
.cpp
testveryfast_CPPFLAGS
=
$(CT_CXXFLAGS)
testveryfast_LDFLAGS
=
$(CT_LDFLAGS)
testveryfast_LDADD
=
$(CT_LIBS)
testfaststream_CPPFLAGS
=
$(CT_CXXFLAGS)
testfaststream_LDFLAGS
=
$(CT_LDFLAGS)
testfaststream_LDADD
=
$(CT_LIBS)
testinputstream_SOURCES
=
\
TestInputStream.cpp
testinputstream_CPPFLAGS
=
$(CT_CXXFLAGS)
testinputstream_LDFLAGS
=
$(CT_LDFLAGS)
testinputstream_LDADD
=
$(CT_LIBS)
teststoptimeout_SOURCES
=
\
...
...
src/TestFastStream.cpp
0 → 100644
View file @
d1f43974
/*
* 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 <chrono>
#include <thread>
using
namespace
std
;
int
main
(
int
argc
,
char
*
argv
[])
{
int
t
=
1E6
;
int
n
=
5
;
if
(
argc
>
1
)
{
t
=
stoi
(
argv
[
1
]);
}
if
(
argc
>
2
)
{
n
=
stoi
(
argv
[
2
]);
}
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
cout
<<
"line "
<<
i
<<
" "
;
int
c
=
i
%
10
;
for
(
int
j
=
0
;
j
<
c
;
++
j
)
{
cout
<<
"*"
;
}
cout
<<
endl
;
if
(
c
==
0
)
{
cout
<<
endl
;
}
this_thread
::
sleep_for
(
chrono
::
microseconds
(
t
));
}
cout
<<
"OOOO"
<<
endl
;
return
0
;
}
src/Test
VeryFast
.cpp
→
src/Test
InputStream
.cpp
View file @
d1f43974
...
...
@@ -16,16 +16,18 @@
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <cameo/cameo.h>
using
namespace
std
;
using
namespace
cameo
;
int
main
(
int
argc
,
char
*
argv
[])
{
cout
<<
"Veryfast"
<<
endl
;
int
x
;
while
(
true
)
{
cout
<<
"Enter a number:"
;
cin
>>
x
;
cout
<<
endl
<<
"Thanks"
<<
endl
;
}
return
0
;
}
src/main/java/fr/ill/ics/cameo/test/TestProcessStream.java
0 → 100644
View file @
d1f43974
package
fr.ill.ics.cameo.test
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
public
class
TestProcessStream
{
private
static
boolean
running
=
true
;
public
static
void
main
(
String
[]
args
)
{
try
{
System
.
out
.
println
(
"Creating Process..."
);
Process
p
=
Runtime
.
getRuntime
().
exec
(
args
);
Thread
t
=
new
Thread
()
{
public
void
run
()
{
System
.
out
.
println
(
"Thread started"
);
// get the input stream of the process and print it
InputStream
in
=
p
.
getInputStream
();
// try {
// for (int i = 0; i < in.available(); i++) {
// System.out.println("" + in.read());
// }
// } catch (IOException e) {
// System.err.println("Error stream");
// }
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
in
));
// test here
try
{
while
(
running
)
{
if
(
reader
.
ready
())
{
System
.
out
.
println
(
"Reader ready"
);
// use read instead?
String
line
=
reader
.
readLine
();
System
.
out
.
println
(
">> "
+
line
);
}
else
{
Thread
.
sleep
(
100
);
}
}
}
catch
(
IOException
e
)
{
System
.
err
.
println
(
"Error stream"
);
}
catch
(
Throwable
e
)
{
System
.
err
.
println
(
"Error "
+
e
);
}
}
};
t
.
start
();
//Thread.sleep(5000);
p
.
waitFor
();
// wait has an influence?
//running = false;
System
.
out
.
println
(
"Terminated process"
);
t
.
join
();
System
.
out
.
println
(
"Terminated thread"
);
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment