Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
9e87fabc
Commit
9e87fabc
authored
Feb 24, 2016
by
Eric Cano
Browse files
Added initial system tests for cta-taped (command line tests).
parent
7f89589a
Changes
4
Hide whitespace changes
Inline
Side-by-side
cta.spec.in
View file @
9e87fabc
...
...
@@ -135,12 +135,14 @@ The shared libraries
Summary: CERN Tape Archive: unit and system tests with virtual tape drives
Group: Application/CTA
Requires: valgrind >= 3.8.1
Requires: cta-taped = %{ctaVersion}-%{ctaRelease}%{mydist}
%description -n cta-systemtests
CERN Tape Archive:
Unit tests and system tests with virtual tape drives
%files -n cta-systemtests
%attr(0755,root,root) %{_bindir}/cta-systemTests
%attr(0755,root,root) %{_libdir}/libsystemTestHelperTests.so
%attr(0755,root,root) %{_libdir}/libcta-tapedSystemTests.so
%attr(0755,root,root) %{_bindir}/cta-unitTests
%attr(0755,root,root) %{_bindir}/cta-valgrindUnitTests.sh
%attr(0755,root,root) %{_bindir}/cta-unitPlusSystemTests.sh
...
...
tapeserver/CMakeLists.txt
View file @
9e87fabc
...
...
@@ -11,3 +11,13 @@ add_executable (cta-taped cta-taped.cpp)
target_link_libraries
(
cta-taped
ctatapedaemon ctacommon protobuf
)
install
(
TARGETS cta-taped DESTINATION usr/bin
)
# CTA's cta-taped system tests.
add_library
(
cta-tapedSystemTests SHARED
cta-tapedSystemtests.cpp
)
target_link_libraries
(
cta-tapedSystemTests
systemTestHelper
ctacommon
)
install
(
TARGETS cta-tapedSystemTests DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
\ No newline at end of file
tapeserver/cta-tapedSystemtests.cpp
View file @
9e87fabc
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include
"tests/Subprocess.hpp"
#include
<gtest/gtest.h>
namespace
systemTests
{
TEST
(
cta_taped
,
InvocationTests
)
{
// Do we get help with -h or --help?
Subprocess
spHelpShort
(
"cta-taped"
,
std
::
list
<
std
::
string
>
({
"cta-taped"
,
"-h"
}));
spHelpShort
.
wait
();
ASSERT_NE
(
std
::
string
::
npos
,
spHelpShort
.
stdout
().
find
(
"Usage"
));
ASSERT_TRUE
(
spHelpShort
.
stderr
().
empty
());
ASSERT_EQ
(
EXIT_SUCCESS
,
spHelpShort
.
exitValue
());
Subprocess
spHelpLong
(
"cta-taped"
,
std
::
list
<
std
::
string
>
({
"cta-taped"
,
"--help"
}));
spHelpLong
.
wait
();
ASSERT_NE
(
std
::
string
::
npos
,
spHelpLong
.
stdout
().
find
(
"Usage: cta-taped [options]"
));
ASSERT_TRUE
(
spHelpLong
.
stderr
().
empty
());
ASSERT_EQ
(
EXIT_SUCCESS
,
spHelpLong
.
exitValue
());
}
}
\ No newline at end of file
tests/CMakeLists.txt
View file @
9e87fabc
...
...
@@ -64,6 +64,7 @@ add_executable(cta-systemTests
target_link_libraries
(
cta-systemTests
systemTestHelper
systemTestHelperTests
cta-tapedSystemTests
gtest
pthread
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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