mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
started repairing test
This commit is contained in:
parent
271bd3aeb2
commit
4921b4564b
@ -216,4 +216,4 @@ install (FILES ${PDF2HTMLEX_RESOURCE} DESTINATION share/pdf2htmlEX)
|
||||
install (FILES pdf2htmlEX.1 DESTINATION share/man/man1)
|
||||
|
||||
enable_testing()
|
||||
add_test(test python ${CMAKE_SOURCE_DIR}/test/test.py)
|
||||
add_test(test python ${CMAKE_SOURCE_DIR}/test/test.py ${CMAKE_BINARY_DIR}/bin/pdf2htmlEX)
|
||||
|
@ -9,6 +9,10 @@ import subprocess
|
||||
|
||||
class Common(object):
|
||||
SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
print "DEBUG 1: ", __file__
|
||||
print "DEBUG 2: ", os.path.abspath(__file__)
|
||||
print "DEBUG 3: ", os.path.dirname(os.path.abspath(__file__))
|
||||
print "DEBUG 4: ", SRC_DIR
|
||||
TEST_DIR = os.path.join(SRC_DIR, 'test')
|
||||
DATA_DIR = os.path.join(SRC_DIR, 'share')
|
||||
PDF2HTMLEX_PATH = os.path.join(SRC_DIR, 'pdf2htmlEX')
|
||||
@ -82,6 +86,9 @@ class Common(object):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if not len(sys.argv)==2:
|
||||
print >> sys.stderr, "Usage: python test.py <pdf2htmlEX_executable_path>"
|
||||
exit(1)
|
||||
if not os.path.isfile(Common.PDF2HTMLEX_PATH) or not os.access(Common.PDF2HTMLEX_PATH, os.X_OK):
|
||||
print >> sys.stderr, "Cannot locate pdf2htmlEX executable. Make sure source was built before running this test."
|
||||
exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user