Import LinuxCNC source tree
This commit is contained in:
0
tests/build/header-sanity/expected
Normal file
0
tests/build/header-sanity/expected
Normal file
26
tests/build/header-sanity/test.sh
Executable file
26
tests/build/header-sanity/test.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
set -xe
|
||||
CPPFLAGS=$(pkg-config --silence-errors --cflags libtirpc)
|
||||
for i in "$HEADERS"/*.h; do
|
||||
case $i in
|
||||
*/rtapi_app.h) continue ;;
|
||||
esac
|
||||
# CPPFLAGS is supposed to be word split
|
||||
# shellcheck disable=SC2086
|
||||
gcc ${CPPFLAGS} -DULAPI -I"$HEADERS" -E -x c "$i" > /dev/null
|
||||
done
|
||||
for i in "$HEADERS"/*.h "$HEADERS"/*.hh; do
|
||||
case $i in
|
||||
*/\*.hh) continue ;;
|
||||
*/rtapi_app.h) continue ;;
|
||||
*/interp_internal.hh) continue ;;
|
||||
esac
|
||||
# shellcheck disable=SC2086
|
||||
if g++ ${CPPFLAGS} -std=c++11 -S -o /dev/null -xcxx /dev/null > /dev/null 2>&1; then
|
||||
ELEVEN=-std=c++11
|
||||
else
|
||||
ELEVEN=-std=c++0x
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
g++ ${CPPFLAGS} "$ELEVEN" -DULAPI -I"$HEADERS" -E -x c++ "$i" > /dev/null
|
||||
done
|
||||
2
tests/build/ui/README
Normal file
2
tests/build/ui/README
Normal file
@@ -0,0 +1,2 @@
|
||||
Test skipped because out-of-tree building with access to NML is not a real
|
||||
option. It requires internal LinucCNC includes to be exposed.
|
||||
0
tests/build/ui/expected
Normal file
0
tests/build/ui/expected
Normal file
22
tests/build/ui/nml-position-logger.cc
Normal file
22
tests/build/ui/nml-position-logger.cc
Normal file
@@ -0,0 +1,22 @@
|
||||
// g++ nml-position-logger.cc -I include -L lib -l nml -l linuxcnc
|
||||
#include "emc.hh"
|
||||
#include "emc_nml.hh"
|
||||
#include <unistd.h>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
if(argc < 2) { std::cerr << "Usage: " << argv[0] << " NMLFILE\n"; abort(); }
|
||||
const char *nmlfile = argv[1];
|
||||
RCS_STAT_CHANNEL *stat = new RCS_STAT_CHANNEL(emcFormat, "emcStatus", "xemc", nmlfile);
|
||||
while(1) {
|
||||
usleep(100*1000);
|
||||
if(!stat->valid()) continue;
|
||||
if(stat->peek() != EMC_STAT_TYPE) continue;
|
||||
EMC_STAT *emcStatus = static_cast<EMC_STAT*>(stat->get_address());
|
||||
std::cout << emcStatus->motion.traj.position.tran.x << " "
|
||||
<< emcStatus->motion.traj.position.tran.y << " "
|
||||
<< emcStatus->motion.traj.position.tran.z << "\n";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
0
tests/build/ui/skip
Normal file
0
tests/build/ui/skip
Normal file
6
tests/build/ui/test.sh
Normal file
6
tests/build/ui/test.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
g++ -I"${HEADERS}" \
|
||||
nml-position-logger.cc \
|
||||
-L "${LIBDIR}" -lnml -llinuxcnc \
|
||||
-o /dev/null
|
||||
Reference in New Issue
Block a user