Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
channel_completion
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jonathan Hanks
channel_completion
Commits
2ee249ce
Commit
2ee249ce
authored
Jan 25, 2019
by
Jonathan Hanks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added gitlab CI. Updated completions, readme.
Added probe to the completion list.
parent
c852524f
Pipeline
#45959
passed with stage
in 9 minutes and 46 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
16 deletions
+84
-16
.gitlab-ci.yml
.gitlab-ci.yml
+72
-0
README.md
README.md
+3
-2
bash/CMakeLists.txt
bash/CMakeLists.txt
+1
-0
lib/tests/test_completion_lib.cc
lib/tests/test_completion_lib.cc
+3
-2
src/tests/test_system_level.cc
src/tests/test_system_level.cc
+5
-12
No files found.
.gitlab-ci.yml
0 → 100644
View file @
2ee249ce
#------------------------------------------------------------------------
# gitlab-runner exec docker --timeout 7200 pages --docker-volumes ${HOME}/Sources/GDS/nds/nds2-test-blobs:/replay_data <target>
variables
:
DOCKER_DRIVER
:
overlay
BRANCH
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
COMMIT
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
NIGHTLY
:
$CI_REGISTRY_IMAGE:nightly
TAG
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
stages
:
-
build-and-test
before_script
:
-
ulimit -S -c
0
#========================================================================
# A N C H O R S
#========================================================================
#------------------------------------------------------------------------
# images
#------------------------------------------------------------------------
.template-image-deb-buster
:
&image-deb-buster
image
:
debian:buster
.template-image-deb-stretch
:
&image-deb-stretch
image
:
ligo/base:stretch
.template-image-deb-jessie
:
&image-deb-jessie
image
:
ligo/base:jessie
#------------------------------------------------------------------------
# Debian
#------------------------------------------------------------------------
.deb:build: &deb-build-and-test
script
:
#--------------------------------------------------------------------
# First update package list and then ...
# Extract the build dependencies and get them installed
#--------------------------------------------------------------------
-
apt-get update
-
apt-get install -y build-essential cmake libboost-dev libpstreams-dev
-
rm -rf ${CI_PROJECT_DIR}/cmake-build
-
mkdir ${CI_PROJECT_DIR}/cmake-build
-
cd ${CI_PROJECT_DIR}/cmake-build
-
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
-
cmake --build . -- VERBOSE=1
-
ctest
-
DESTDIR=${CI_PROJECT_DIR}/cmake-build/t cmake --build . --target install
artifacts
:
expire_in
:
1h
paths
:
-
cmake-build/t
only
:
-
pushes
-
schedules
ligo-channel-completion:buster:
stage
:
build-and-test
<<
:
*image-deb-buster
<<
:
*deb-build-and-test
ligo-channel-completion:stretch:
stage
:
build-and-test
<<
:
*image-deb-stretch
<<
:
*deb-build-and-test
ligo-channel-completion:jessie:
stage
:
build-and-test
<<
:
*image-deb-jessie
<<
:
*deb-build-and-test
\ No newline at end of file
README.md
View file @
2ee249ce
...
...
@@ -6,7 +6,7 @@ every line is a single channel name. The file must be sorted.
The path to the files is set via the 'EPICS_CHAN_LIST' and 'NDS_CHAN_LIST' environment variables.
As the names imply the database are for EPICS channels or D
aq
/NDS channels. This split is needed
As the names imply the database are for EPICS channels or D
AQ
/NDS channels. This split is needed
as in the LIGO control room there are > 500k channels, with roughly half are available only as EPICS channels.
By specifically supporting EPICS channels then non-daq channels like string records can be completed against
for caget/caput/...
...
...
@@ -18,7 +18,7 @@ directly takes the database on the command line.
<pre>
# assuming that the channel database is
# located at db.txt.
channel_completion -d db.txt -r > tmpfile
ligo_
channel_completion -d db.txt -r > tmpfile
mv tmpfile db.txt
</pre>
...
...
@@ -26,6 +26,7 @@ Requirements:
*
A C++11 compliant compiler.
*
CMake 3+
*
Boost iterator library
*
pstreams library
Debian requirements:
*
build-essential
...
...
bash/CMakeLists.txt
View file @
2ee249ce
...
...
@@ -8,6 +8,7 @@ set (COMPLETE_THESE_EPICS_COMMANDS
caget
caput
camonitor
probe
)
set
(
COMPLETE_NDS_COMMAND_REGISTRATION
)
...
...
lib/tests/test_completion_lib.cc
View file @
2ee249ce
...
...
@@ -44,14 +44,15 @@ public:
other
.
fd_
=
-
1
;
}
temporary_fd
operator
=
(
const
temporary_fd
&
other
)
=
delete
;
temporary_fd
operator
=
(
temporary_fd
&&
other
)
temporary_fd
&
operator
=
(
temporary_fd
&&
other
)
noexcept
{
unlink
(
);
fd_
=
other
.
fd_
;
name_
=
std
::
move
(
other
.
name_
);
other
.
fd_
=
-
1
;
other
.
name_
.
clear
(
);
return
*
this
;
};
~
temporary_fd
(
)
...
...
src/tests/test_system_level.cc
View file @
2ee249ce
...
...
@@ -52,14 +52,15 @@ public:
other
.
fd_
=
-
1
;
}
temporary_fd
operator
=
(
const
temporary_fd
&
other
)
=
delete
;
temporary_fd
operator
=
(
temporary_fd
&&
other
)
temporary_fd
&
operator
=
(
temporary_fd
&&
other
)
noexcept
{
unlink
(
);
fd_
=
other
.
fd_
;
name_
=
std
::
move
(
other
.
name_
);
other
.
fd_
=
-
1
;
other
.
name_
.
clear
(
);
return
*
this
;
};
~
temporary_fd
(
)
...
...
@@ -142,14 +143,6 @@ private:
std
::
string
name_
;
};
std
::
string
readsome
(
std
::
istream
&
is
)
{
char
buffer
[
100
];
auto
count
=
is
.
readsome
(
buffer
,
sizeof
(
buffer
)
);
return
std
::
string
(
buffer
,
count
);
}
void
run_test
(
const
std
::
vector
<
std
::
string
>&
input
,
const
std
::
vector
<
std
::
string
>&
extra_args
,
...
...
@@ -202,7 +195,7 @@ TEST_CASE( "You can run the test program" )
{
std
::
vector
<
std
::
string
>
args
;
args
.
push_back
(
test_program_name
);
args
.
push
_back
(
"H1:"
);
args
.
emplace
_back
(
"H1:"
);
redi
::
ipstream
prog
(
test_program_name
,
args
);
REQUIRE
(
prog
.
is_open
(
)
);
...
...
@@ -219,7 +212,7 @@ TEST_CASE( "You can run the test program" )
prog
.
close
(
);
REQUIRE
(
prog
.
rdbuf
(
)
->
exited
(
)
);
REQUIRE
(
prog
.
rdbuf
(
)
->
status
(
)
==
0
);
REQUIRE
(
choices
.
size
(
)
==
0
);
REQUIRE
(
choices
.
empty
(
)
);
}
TEST_CASE
(
"Basic completion behavior with an specified database no input"
)
...
...
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