Merge pull request #2703 from NorbertHeusser/makefile-improvements
Makefile improvementspull/2709/head
commit
ac5dfca52a
@ -1,19 +1,3 @@
|
||||
file(GLOB PY_TEST_FILES [0-9][0-9]-*.py)
|
||||
|
||||
set(EXCLUDE_LIST
|
||||
# none
|
||||
)
|
||||
|
||||
foreach(PY_TEST_FILE ${PY_TEST_FILES})
|
||||
get_filename_component(PY_TEST_NAME ${PY_TEST_FILE} NAME_WE)
|
||||
if(${PY_TEST_NAME} IN_LIST EXCLUDE_LIST)
|
||||
continue()
|
||||
endif()
|
||||
add_test(NAME apps-${PY_TEST_NAME}
|
||||
COMMAND ${PY_TEST_FILE}
|
||||
)
|
||||
set_tests_properties(apps-${PY_TEST_NAME}
|
||||
PROPERTIES
|
||||
ENVIRONMENT "BUILD_ROOT=${CMAKE_BINARY_DIR}"
|
||||
)
|
||||
endforeach()
|
||||
add_subdirectory(ctrl)
|
||||
add_subdirectory(db_dump)
|
||||
add_subdirectory(passwd)
|
||||
|
@ -0,0 +1,19 @@
|
||||
file(GLOB PY_TEST_FILES [0-9][0-9]-*.py)
|
||||
|
||||
set(EXCLUDE_LIST
|
||||
# none
|
||||
)
|
||||
|
||||
foreach(PY_TEST_FILE ${PY_TEST_FILES})
|
||||
get_filename_component(PY_TEST_NAME ${PY_TEST_FILE} NAME_WE)
|
||||
if(${PY_TEST_NAME} IN_LIST EXCLUDE_LIST)
|
||||
continue()
|
||||
endif()
|
||||
add_test(NAME apps-${PY_TEST_NAME}
|
||||
COMMAND ${PY_TEST_FILE}
|
||||
)
|
||||
set_tests_properties(apps-${PY_TEST_NAME}
|
||||
PROPERTIES
|
||||
ENVIRONMENT "BUILD_ROOT=${CMAKE_BINARY_DIR}"
|
||||
)
|
||||
endforeach()
|
@ -0,0 +1,19 @@
|
||||
R=../../..
|
||||
include ${R}/config.mk
|
||||
|
||||
.PHONY: all check test ptest clean
|
||||
.NOTPARALLEL:
|
||||
|
||||
all :
|
||||
|
||||
check : test
|
||||
|
||||
test :
|
||||
./ctrl-args.py
|
||||
./ctrl-broker.py
|
||||
./ctrl-dynsec.py
|
||||
|
||||
ptest:
|
||||
./test.py
|
||||
|
||||
clean:
|
@ -0,0 +1,19 @@
|
||||
import logging
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format="%(levelname)s %(asctime)s.%(msecs)03d %(module)s: %(message)s",
|
||||
datefmt="%H:%M:%S",
|
||||
)
|
||||
|
||||
current_source_dir = Path(__file__).resolve().parent
|
||||
test_dir = current_source_dir.parents[1]
|
||||
if test_dir not in sys.path:
|
||||
sys.path.insert(0, str(test_dir))
|
||||
|
||||
import mosq_test
|
||||
import subprocess
|
||||
import os
|
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import mosq_test_helper
|
||||
import pathlib
|
||||
import ptest
|
||||
|
||||
tests = [
|
||||
(0, './ctrl-args.py'),
|
||||
(2, './ctrl-broker.py'),
|
||||
(2, './ctrl-dynsec.py')
|
||||
]
|
||||
|
||||
ptest.run_tests(tests)
|
@ -0,0 +1,19 @@
|
||||
file(GLOB PY_TEST_FILES [0-9][0-9]-*.py)
|
||||
|
||||
set(EXCLUDE_LIST
|
||||
# none
|
||||
)
|
||||
|
||||
foreach(PY_TEST_FILE ${PY_TEST_FILES})
|
||||
get_filename_component(PY_TEST_NAME ${PY_TEST_FILE} NAME_WE)
|
||||
if(${PY_TEST_NAME} IN_LIST EXCLUDE_LIST)
|
||||
continue()
|
||||
endif()
|
||||
add_test(NAME apps-${PY_TEST_NAME}
|
||||
COMMAND ${PY_TEST_FILE}
|
||||
)
|
||||
set_tests_properties(apps-${PY_TEST_NAME}
|
||||
PROPERTIES
|
||||
ENVIRONMENT "BUILD_ROOT=${CMAKE_BINARY_DIR}"
|
||||
)
|
||||
endforeach()
|
@ -0,0 +1,21 @@
|
||||
.PHONY: all check test test-compile ptest clean
|
||||
|
||||
all :
|
||||
|
||||
check : test
|
||||
|
||||
test-compile:
|
||||
|
||||
test:
|
||||
./db-dump-client-stats.py
|
||||
./db-dump-corrupt.py
|
||||
./db-dump-print-empty.py
|
||||
./db-dump-print-v6-all.py
|
||||
./db-dump-print-v6-mqtt-v5-props.py
|
||||
./db-dump-stats.py
|
||||
./db-dump-stats-current.py
|
||||
|
||||
ptest:
|
||||
./test.py
|
||||
|
||||
clean :
|
@ -0,0 +1,18 @@
|
||||
import logging
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format="%(levelname)s %(asctime)s.%(msecs)03d %(module)s: %(message)s",
|
||||
datefmt="%H:%M:%S",
|
||||
)
|
||||
|
||||
current_source_dir = Path(__file__).resolve().parent
|
||||
test_dir = current_source_dir.parents[1]
|
||||
if test_dir not in sys.path:
|
||||
sys.path.insert(0, str(test_dir))
|
||||
|
||||
import mosq_test
|
||||
import subprocess
|
||||
import os
|
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import mosq_test_helper
|
||||
import pathlib
|
||||
import ptest
|
||||
|
||||
tests = []
|
||||
|
||||
for test_file in pathlib.Path('.').glob('db-dump-*.py'):
|
||||
tests.append((1, test_file.resolve()))
|
||||
|
||||
ptest.run_tests(tests)
|
@ -0,0 +1,19 @@
|
||||
file(GLOB PY_TEST_FILES [0-9][0-9]-*.py)
|
||||
|
||||
set(EXCLUDE_LIST
|
||||
# none
|
||||
)
|
||||
|
||||
foreach(PY_TEST_FILE ${PY_TEST_FILES})
|
||||
get_filename_component(PY_TEST_NAME ${PY_TEST_FILE} NAME_WE)
|
||||
if(${PY_TEST_NAME} IN_LIST EXCLUDE_LIST)
|
||||
continue()
|
||||
endif()
|
||||
add_test(NAME apps-${PY_TEST_NAME}
|
||||
COMMAND ${PY_TEST_FILE}
|
||||
)
|
||||
set_tests_properties(apps-${PY_TEST_NAME}
|
||||
PROPERTIES
|
||||
ENVIRONMENT "BUILD_ROOT=${CMAKE_BINARY_DIR}"
|
||||
)
|
||||
endforeach()
|
@ -0,0 +1,18 @@
|
||||
R=../../..
|
||||
include ${R}/config.mk
|
||||
|
||||
.PHONY: all check test ptest clean
|
||||
.NOTPARALLEL:
|
||||
|
||||
all :
|
||||
|
||||
check : test
|
||||
|
||||
test :
|
||||
./passwd-args.py
|
||||
./passwd-changes.py
|
||||
|
||||
ptest :
|
||||
./test.py
|
||||
|
||||
clean:
|
@ -0,0 +1,18 @@
|
||||
import logging
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format="%(levelname)s %(asctime)s.%(msecs)03d %(module)s: %(message)s",
|
||||
datefmt="%H:%M:%S",
|
||||
)
|
||||
|
||||
current_source_dir = Path(__file__).resolve().parent
|
||||
test_dir = current_source_dir.parents[1]
|
||||
if test_dir not in sys.path:
|
||||
sys.path.insert(0, str(test_dir))
|
||||
|
||||
import mosq_test
|
||||
import subprocess
|
||||
import os
|
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import mosq_test_helper
|
||||
import pathlib
|
||||
import ptest
|
||||
|
||||
tests = []
|
||||
|
||||
for test_file in pathlib.Path('.').glob('passwd-*.py'):
|
||||
tests.append((1, test_file.resolve()))
|
||||
|
||||
ptest.run_tests(tests)
|
Loading…
Reference in New Issue