Ticket #15344: 0002-Integrate-ntor-test-into-the-automake-test-suite.2.patch

File 0002-Integrate-ntor-test-into-the-automake-test-suite.2.patch, 2.3 KB (added by cypherpunks, 6 years ago)
  • .gitignore

    From ac7da78a307f8a47c9836fc00dd2bcf90d371146 Mon Sep 17 00:00:00 2001
    From: cypherpunks <cypherpunks@torproject.org>
    Date: Thu, 5 Mar 2015 10:43:12 +0100
    Subject: [PATCH 2/4] Integrate ntor test into the automake test suite.
    
    ---
     .gitignore               | 1 +
     configure.ac             | 1 +
     src/test/include.am      | 6 ++++--
     src/test/test_ntor.sh.in | 9 +++++++++
     4 files changed, 15 insertions(+), 2 deletions(-)
     create mode 100644 src/test/test_ntor.sh.in
    
    diff --git a/.gitignore b/.gitignore
    index 5fc000f..da5fc47 100644
    a b cscope.* 
    175175/src/test/test-ntor-cl.exe
    176176/src/test/test_workqueue.exe
    177177/src/test/test_zero_length_keys.sh
     178/src/test/test_ntor.sh
    178179
    179180# /src/tools/
    180181/src/tools/tor-checkkey
  • configure.ac

    diff --git a/configure.ac b/configure.ac
    index 32afc1b..184211b 100644
    a b AC_CONFIG_FILES([ 
    16631663        scripts/maint/checkOptionDocs.pl
    16641664        scripts/maint/updateVersions.pl
    16651665        src/test/test_zero_length_keys.sh
     1666        src/test/test_ntor.sh
    16661667])
    16671668
    16681669if test x$asciidoc = xtrue && test "$ASCIIDOC" = "none" ; then
  • src/test/include.am

    diff --git a/src/test/include.am b/src/test/include.am
    index eba13ab..0ed3cb3 100644
    a b  
    11TESTS += src/test/test src/test/test-slow src/test/test-memwipe \
    22        src/test/test_zero_length_keys.sh
    33
     4if USEPYTHON
     5TESTS += src/test/test_ntor.sh
     6endif
     7
    48TEST_EXTENSIONS = .sh
    59SH_LOG_COMPILER = $(SHELL)
    610
    src_test_test_bt_cl_CPPFLAGS= $(src_test_AM_CPPFLAGS) $(TEST_CPPFLAGS) 
    169173
    170174check-local: $(NTOR_TEST_DEPS) $(CMDLINE_TEST_TOR)
    171175if USEPYTHON
    172         $(PYTHON) $(top_srcdir)/src/test/ntor_ref.py test-tor
    173         $(PYTHON) $(top_srcdir)/src/test/ntor_ref.py self-test
    174176        $(top_builddir)/src/test/test-bt-cl assert | $(PYTHON) $(top_srcdir)/src/test/bt_test.py
    175177        $(top_builddir)/src/test/test-bt-cl crash | $(PYTHON) $(top_srcdir)/src/test/bt_test.py
    176178endif
  • new file src/test/test_ntor.sh.in

    diff --git a/src/test/test_ntor.sh.in b/src/test/test_ntor.sh.in
    new file mode 100644
    index 0000000..5fea8ce
    - +  
     1#!/bin/sh
     2# Validate Tor's ntor implementation.
     3
     4exitcode=0
     5
     6@PYTHON@ @abs_top_srcdir@/src/test/ntor_ref.py test-tor || exitcode=1
     7@PYTHON@ @abs_top_srcdir@/src/test/ntor_ref.py self-test || exitcode=1
     8
     9exit ${exitcode}