Ticket #8195: 0001-Do-not-run-switch_id-test-on-Windows.patch

File 0001-Do-not-run-switch_id-test-on-Windows.patch, 892 bytes (added by cypherpunks, 5 years ago)
  • src/test/test_switch_id.c

    From 7699f73e3edd54d289ad8fbe0ab040a2e6541b80 Mon Sep 17 00:00:00 2001
    From: cypherpunks <cypherpunks@torproject.org>
    Date: Wed, 16 Dec 2015 22:10:43 +0100
    Subject: [PATCH 1/6] Do not run switch_id test on Windows
    
    ---
     src/test/test_switch_id.c | 8 ++++++++
     1 file changed, 8 insertions(+)
    
    diff --git a/src/test/test_switch_id.c b/src/test/test_switch_id.c
    index e85025c..e956f33 100644
    a b check_can_bind_low_ports(void) 
    7575int
    7676main(int argc, char **argv)
    7777{
     78#if defined(_WIN32)
     79  (void) argc;
     80  (void) argv;
     81
     82  fprintf(stderr, "This test is not supported on your OS.\n");
     83  return 1;
     84#else
    7885  const char *testname;
    7986  if (argc != 3) {
    8087    fprintf(stderr, "I want 2 arguments: a username and a command.\n");
    main(int argc, char **argv) 
    177184  }
    178185
    179186  return (okay ? 0 : 1);
     187#endif
    180188}
    181189