Skip to content

Commit

Permalink
test running all tests on windows, and call python with windows-paths
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Oct 31, 2020
1 parent 74a7dd9 commit 8770d10
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ build_script:
test_script:
- cd %ROOT_DIRECTORY%\test
- if defined bjam (
appveyor-retry b2.exe -l500 --hash openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on win-tests
appveyor-retry b2.exe -l500 --hash openssl-version=pre1.1 warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% asserts=on export-extra=on
)

- cd %ROOT_DIRECTORY%\bindings\python
Expand Down
18 changes: 12 additions & 6 deletions test/setup_transfer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ using namespace lt;
#include <conio.h>
#endif

#if defined TORRENT_WINDOWS
#define SEPARATOR "\\"
#else
#define SEPARATOR "/"
#endif

std::shared_ptr<torrent_info> generate_torrent(bool const with_files, bool const with_hashes)
{
if (with_files)
Expand Down Expand Up @@ -677,25 +683,25 @@ int start_proxy(int proxy_type)
case settings_pack::socks4:
type = "socks4";
auth = " --allow-v4";
cmd = "../socks.py";
cmd = ".." SEPARATOR "socks.py";
break;
case settings_pack::socks5:
type = "socks5";
cmd = "../socks.py";
cmd = ".." SEPARATOR "socks.py";
break;
case settings_pack::socks5_pw:
type = "socks5";
auth = " --username testuser --password testpass";
cmd = "../socks.py";
cmd = ".." SEPARATOR "socks.py";
break;
case settings_pack::http:
type = "http";
cmd = "../http_proxy.py";
cmd = ".." SEPARATOR "http_proxy.py";
break;
case settings_pack::http_pw:
type = "http";
auth = " --basic-auth testuser:testpass";
cmd = "../http_proxy.py";
cmd = ".." SEPARATOR "http_proxy.py";
break;
}
std::string python_exe = get_python();
Expand Down Expand Up @@ -1073,7 +1079,7 @@ int start_web_server(bool ssl, bool chunked_encoding, bool keepalive, int min_in
std::string python_exe = get_python();

char buf[200];
std::snprintf(buf, sizeof(buf), "%s ../web_server.py %d %d %d %d %d"
std::snprintf(buf, sizeof(buf), "%s .." SEPARATOR "web_server.py %d %d %d %d %d"
, python_exe.c_str(), port, chunked_encoding, ssl, keepalive, min_interval);

std::printf("%s starting web_server on port %d...\n", time_now_string(), port);
Expand Down

0 comments on commit 8770d10

Please sign in to comment.