summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2022-11-05 22:46:02 +0900
committerRyo Nakamura <upa@haeena.net>2022-11-05 22:46:02 +0900
commit243bf1fa5710c0928e4a52ad4c5a0f0e73022554 (patch)
tree41f692ce8c03534e149841de6600dc84ec50e7ee /test
parent8cb5c81fcfc5a43224c1d2c0eed374d85667a0d8 (diff)
add -H option to disable host key check
tests use this option.
Diffstat (limited to 'test')
-rw-r--r--test/Makefile349
-rw-r--r--test/test_e2e.py20
2 files changed, 359 insertions, 10 deletions
diff --git a/test/Makefile b/test/Makefile
new file mode 100644
index 0000000..e3a8ee5
--- /dev/null
+++ b/test/Makefile
@@ -0,0 +1,349 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.24
+
+# Default target executed when no arguments are given to make.
+default_target: all
+.PHONY : default_target
+
+# Allow only one "make -f Makefile2" at a time, but pass parallelism.
+.NOTPARALLEL:
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /usr/local/Cellar/cmake/3.24.2/bin/cmake
+
+# The command to remove a file.
+RM = /usr/local/Cellar/cmake/3.24.2/bin/cmake -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /Users/upa/work/code/mscp
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /Users/upa/work/code/mscp/test
+
+#=============================================================================
+# Targets provided globally by CMake.
+
+# Special rule for the target test
+test:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
+ /usr/local/Cellar/cmake/3.24.2/bin/ctest --force-new-ctest-process $(ARGS)
+.PHONY : test
+
+# Special rule for the target test
+test/fast: test
+.PHONY : test/fast
+
+# Special rule for the target edit_cache
+edit_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
+ /usr/local/Cellar/cmake/3.24.2/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : edit_cache
+
+# Special rule for the target edit_cache
+edit_cache/fast: edit_cache
+.PHONY : edit_cache/fast
+
+# Special rule for the target rebuild_cache
+rebuild_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
+ /usr/local/Cellar/cmake/3.24.2/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : rebuild_cache
+
+# Special rule for the target rebuild_cache
+rebuild_cache/fast: rebuild_cache
+.PHONY : rebuild_cache/fast
+
+# Special rule for the target list_install_components
+list_install_components:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
+.PHONY : list_install_components
+
+# Special rule for the target list_install_components
+list_install_components/fast: list_install_components
+.PHONY : list_install_components/fast
+
+# Special rule for the target install
+install: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/local/Cellar/cmake/3.24.2/bin/cmake -P cmake_install.cmake
+.PHONY : install
+
+# Special rule for the target install
+install/fast: preinstall/fast
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/local/Cellar/cmake/3.24.2/bin/cmake -P cmake_install.cmake
+.PHONY : install/fast
+
+# Special rule for the target install/local
+install/local: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
+ /usr/local/Cellar/cmake/3.24.2/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
+.PHONY : install/local
+
+# Special rule for the target install/local
+install/local/fast: preinstall/fast
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
+ /usr/local/Cellar/cmake/3.24.2/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
+.PHONY : install/local/fast
+
+# Special rule for the target install/strip
+install/strip: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
+ /usr/local/Cellar/cmake/3.24.2/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
+.PHONY : install/strip
+
+# Special rule for the target install/strip
+install/strip/fast: preinstall/fast
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
+ /usr/local/Cellar/cmake/3.24.2/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
+.PHONY : install/strip/fast
+
+# The main all target
+all: cmake_check_build_system
+ $(CMAKE_COMMAND) -E cmake_progress_start /Users/upa/work/code/mscp/test/CMakeFiles /Users/upa/work/code/mscp/test//CMakeFiles/progress.marks
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all
+ $(CMAKE_COMMAND) -E cmake_progress_start /Users/upa/work/code/mscp/test/CMakeFiles 0
+.PHONY : all
+
+# The main clean target
+clean:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean
+.PHONY : clean
+
+# The main clean target
+clean/fast: clean
+.PHONY : clean/fast
+
+# Prepare targets for installation.
+preinstall: all
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
+.PHONY : preinstall
+
+# Prepare targets for installation.
+preinstall/fast:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
+.PHONY : preinstall/fast
+
+# clear depends
+depend:
+ $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+.PHONY : depend
+
+#=============================================================================
+# Target rules for targets named mscp
+
+# Build rule for target.
+mscp: cmake_check_build_system
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 mscp
+.PHONY : mscp
+
+# fast build rule for target.
+mscp/fast:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/build
+.PHONY : mscp/fast
+
+src/file.o: src/file.c.o
+.PHONY : src/file.o
+
+# target to build an object file
+src/file.c.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/file.c.o
+.PHONY : src/file.c.o
+
+src/file.i: src/file.c.i
+.PHONY : src/file.i
+
+# target to preprocess a source file
+src/file.c.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/file.c.i
+.PHONY : src/file.c.i
+
+src/file.s: src/file.c.s
+.PHONY : src/file.s
+
+# target to generate assembly for a file
+src/file.c.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/file.c.s
+.PHONY : src/file.c.s
+
+src/main.o: src/main.c.o
+.PHONY : src/main.o
+
+# target to build an object file
+src/main.c.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/main.c.o
+.PHONY : src/main.c.o
+
+src/main.i: src/main.c.i
+.PHONY : src/main.i
+
+# target to preprocess a source file
+src/main.c.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/main.c.i
+.PHONY : src/main.c.i
+
+src/main.s: src/main.c.s
+.PHONY : src/main.s
+
+# target to generate assembly for a file
+src/main.c.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/main.c.s
+.PHONY : src/main.c.s
+
+src/platform.o: src/platform.c.o
+.PHONY : src/platform.o
+
+# target to build an object file
+src/platform.c.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/platform.c.o
+.PHONY : src/platform.c.o
+
+src/platform.i: src/platform.c.i
+.PHONY : src/platform.i
+
+# target to preprocess a source file
+src/platform.c.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/platform.c.i
+.PHONY : src/platform.c.i
+
+src/platform.s: src/platform.c.s
+.PHONY : src/platform.s
+
+# target to generate assembly for a file
+src/platform.c.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/platform.c.s
+.PHONY : src/platform.c.s
+
+src/pprint.o: src/pprint.c.o
+.PHONY : src/pprint.o
+
+# target to build an object file
+src/pprint.c.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/pprint.c.o
+.PHONY : src/pprint.c.o
+
+src/pprint.i: src/pprint.c.i
+.PHONY : src/pprint.i
+
+# target to preprocess a source file
+src/pprint.c.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/pprint.c.i
+.PHONY : src/pprint.c.i
+
+src/pprint.s: src/pprint.c.s
+.PHONY : src/pprint.s
+
+# target to generate assembly for a file
+src/pprint.c.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/pprint.c.s
+.PHONY : src/pprint.c.s
+
+src/ssh.o: src/ssh.c.o
+.PHONY : src/ssh.o
+
+# target to build an object file
+src/ssh.c.o:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/ssh.c.o
+.PHONY : src/ssh.c.o
+
+src/ssh.i: src/ssh.c.i
+.PHONY : src/ssh.i
+
+# target to preprocess a source file
+src/ssh.c.i:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/ssh.c.i
+.PHONY : src/ssh.c.i
+
+src/ssh.s: src/ssh.c.s
+.PHONY : src/ssh.s
+
+# target to generate assembly for a file
+src/ssh.c.s:
+ $(MAKE) $(MAKESILENT) -f CMakeFiles/mscp.dir/build.make CMakeFiles/mscp.dir/src/ssh.c.s
+.PHONY : src/ssh.c.s
+
+# Help Target
+help:
+ @echo "The following are some of the valid targets for this Makefile:"
+ @echo "... all (the default if no target is provided)"
+ @echo "... clean"
+ @echo "... depend"
+ @echo "... edit_cache"
+ @echo "... install"
+ @echo "... install/local"
+ @echo "... install/strip"
+ @echo "... list_install_components"
+ @echo "... rebuild_cache"
+ @echo "... test"
+ @echo "... mscp"
+ @echo "... src/file.o"
+ @echo "... src/file.i"
+ @echo "... src/file.s"
+ @echo "... src/main.o"
+ @echo "... src/main.i"
+ @echo "... src/main.s"
+ @echo "... src/platform.o"
+ @echo "... src/platform.i"
+ @echo "... src/platform.s"
+ @echo "... src/pprint.o"
+ @echo "... src/pprint.i"
+ @echo "... src/pprint.s"
+ @echo "... src/ssh.o"
+ @echo "... src/ssh.i"
+ @echo "... src/ssh.s"
+.PHONY : help
+
+
+
+#=============================================================================
+# Special targets to cleanup operation of make.
+
+# Special rule to run CMake to check the build system integrity.
+# No rule that depends on this can have commands that come from listfiles
+# because they might be regenerated.
+cmake_check_build_system:
+ $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+.PHONY : cmake_check_build_system
+
diff --git a/test/test_e2e.py b/test/test_e2e.py
index bc06805..25a566d 100644
--- a/test/test_e2e.py
+++ b/test/test_e2e.py
@@ -49,7 +49,7 @@ param_single_copy = [
@pytest.mark.parametrize("src, dst", param_single_copy)
def test_single_copy_remote2local(mscp, src, dst):
src.make()
- run2ok([mscp, remote_prefix + src.path, dst.path])
+ run2ok([mscp, "-H", remote_prefix + src.path, dst.path])
assert check_same_md5sum(src, dst)
src.cleanup()
dst.cleanup()
@@ -57,7 +57,7 @@ def test_single_copy_remote2local(mscp, src, dst):
@pytest.mark.parametrize("src, dst", param_single_copy)
def test_single_copy_local2remote(mscp, src, dst):
src.make()
- run2ok([mscp, src.path, remote_prefix + dst.path])
+ run2ok([mscp, "-H", src.path, remote_prefix + dst.path])
assert check_same_md5sum(src, dst)
src.cleanup()
dst.cleanup()
@@ -92,11 +92,11 @@ def test_dir_copy_remote2local(mscp, src_dir, dst_dir, src, dst, twice):
for f in src:
f.make()
- run2ok([mscp, remote_prefix + src_dir, dst_dir])
+ run2ok([mscp, "-H", remote_prefix + src_dir, dst_dir])
for sf, df in zip(src, dst):
assert check_same_md5sum(sf, df)
- run2ok([mscp, remote_prefix + src_dir, dst_dir])
+ run2ok([mscp, "-H", remote_prefix + src_dir, dst_dir])
for sf, df in zip(src, twice):
assert check_same_md5sum(sf, df)
@@ -110,11 +110,11 @@ def test_dir_copy_local2remote(mscp, src_dir, dst_dir, src, dst, twice):
for f in src:
f.make()
- run2ok([mscp, src_dir, remote_prefix + dst_dir])
+ run2ok([mscp, "-H", src_dir, remote_prefix + dst_dir])
for sf, df in zip(src, dst):
assert check_same_md5sum(sf, df)
- run2ok([mscp, src_dir, remote_prefix + dst_dir])
+ run2ok([mscp, "-H", src_dir, remote_prefix + dst_dir])
for sf, df in zip(src, twice):
assert check_same_md5sum(sf, df)
@@ -133,7 +133,7 @@ def test_override_single_file(mscp, src_prefix, dst_prefix):
dst = File("dst", size = 128).make()
assert not check_same_md5sum(src, dst)
- run2ok([mscp, src_prefix + src.path, dst_prefix + dst.path])
+ run2ok([mscp, "-H", src_prefix + src.path, dst_prefix + dst.path])
assert check_same_md5sum(src, dst)
src.cleanup()
@@ -144,7 +144,7 @@ def test_min_chunk(mscp, src_prefix, dst_prefix):
src = File("src", size = 16 * 1024).make()
dst = File("dst")
- run2ok([mscp, "-s", 8192, src_prefix + src.path, dst_prefix + dst.path])
+ run2ok([mscp, "-H", "-s", 8192, src_prefix + src.path, dst_prefix + dst.path])
assert check_same_md5sum(src, dst)
src.cleanup()
@@ -155,7 +155,7 @@ def test_cannot_override_file_with_dir(mscp, src_prefix, dst_prefix):
src = File("src", size = 128).make()
dst = File("dst").make()
- run2ng([mscp, src_prefix + src.path, dst_prefix + "dst/src"])
+ run2ng([mscp, "-H", src_prefix + src.path, dst_prefix + "dst/src"])
src.cleanup()
dst.cleanup()
@@ -164,7 +164,7 @@ def test_cannot_override_file_with_dir(mscp, src_prefix, dst_prefix):
def test_transfer_zero_bytes(mscp, src_prefix, dst_prefix):
src = File("src", size = 0).make()
dst = File("dst")
- run2ok([mscp, src_prefix + src.path, dst_prefix + "dst"])
+ run2ok([mscp, "-H", src_prefix + src.path, dst_prefix + "dst"])
assert os.path.exists("dst")
src.cleanup()
dst.cleanup()