diff --git a/Makefile.am b/Makefile.am index f9f7f49..513d7f6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,11 +38,27 @@ pyx_verbose_0 = @echo " PYX " $@; EXTRA_DIST = EXTRA_DIST += README +EXTRA_DIST += CAVEATS EXTRA_DIST += LICENSE +EXTRA_DIST += doc/format.txt +EXTRA_DIST += doc/tests.txt include_HEADERS = macaroons.h -noinst_HEADERS = base64.h constants.h custom-config.h packet.h port.h +noinst_HEADERS = +noinst_HEADERS += base64.h +noinst_HEADERS += constants.h +noinst_HEADERS += custom-config.h +noinst_HEADERS += macaroons-inner.h +noinst_HEADERS += packet.h +noinst_HEADERS += port.h +noinst_HEADERS += sha256.h +noinst_HEADERS += slice.h +noinst_HEADERS += sysendian.h +noinst_HEADERS += tweetnacl.h +noinst_HEADERS += varint.h +noinst_HEADERS += v1.h +noinst_HEADERS += v2.h lib_LTLIBRARIES = libmacaroons.la @@ -123,6 +139,26 @@ macaroon_unit_test_stubs += test/unit/serialization_3.sh TESTS += $(macaroon_unit_test_stubs) check_SCRIPTS += $(macaroon_unit_test_stubs) +EXTRA_DIST += $(macaroon_unit_test_stubs) +EXTRA_DIST += test/unit/caveat_v1_1.vtest +EXTRA_DIST += test/unit/caveat_v1_2.vtest +EXTRA_DIST += test/unit/caveat_v1_3.vtest +EXTRA_DIST += test/unit/caveat_v1_4.vtest +EXTRA_DIST += test/unit/caveat_v1_5.vtest +EXTRA_DIST += test/unit/caveat_v1_6.vtest +EXTRA_DIST += test/unit/caveat_v2_1.vtest +EXTRA_DIST += test/unit/caveat_v2_2.vtest +EXTRA_DIST += test/unit/caveat_v2_3.vtest +EXTRA_DIST += test/unit/caveat_v2_4.vtest +EXTRA_DIST += test/unit/caveat_v2_5.vtest +EXTRA_DIST += test/unit/caveat_v2_6.vtest +EXTRA_DIST += test/unit/root_v1_1.vtest +EXTRA_DIST += test/unit/root_v1_2.vtest +EXTRA_DIST += test/unit/root_v2_1.vtest +EXTRA_DIST += test/unit/root_v2_2.vtest +EXTRA_DIST += test/unit/serialization_1 +EXTRA_DIST += test/unit/serialization_2 +EXTRA_DIST += test/unit/serialization_3 #################################### Python #################################### diff --git a/maint/generate-shell-stubs b/maint/generate-shell-stubs index 9f94fa7..99bb2b3 100755 --- a/maint/generate-shell-stubs +++ b/maint/generate-shell-stubs @@ -8,17 +8,18 @@ for x in glob.glob('test/unit/*.vtest'): fname = x + '.sh' f = open(fname, 'w') f.write('''#!/bin/sh -exec macaroon-test-verifier < {0} +exec macaroon-test-verifier < "${{MACAROONS_SRCDIR}}/{0}" '''.format(x)) f.flush() f.close() os.chmod(fname, stat.S_IRWXU) for x in glob.glob('test/unit/serialization*'): + if x.endswith('.sh'): continue fname = x + '.sh' f = open(fname, 'w') f.write('''#!/bin/sh -exec macaroon-test-serialization < {0} +exec macaroon-test-serialization < "${{MACAROONS_SRCDIR}}/{0}" '''.format(x)) f.flush() f.close() diff --git a/test/unit/caveat_v1_1.vtest.sh b/test/unit/caveat_v1_1.vtest.sh index 874625c..c74ac2b 100755 --- a/test/unit/caveat_v1_1.vtest.sh +++ b/test/unit/caveat_v1_1.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v1_1.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v1_1.vtest" diff --git a/test/unit/caveat_v1_2.vtest.sh b/test/unit/caveat_v1_2.vtest.sh index 5dded60..f037165 100755 --- a/test/unit/caveat_v1_2.vtest.sh +++ b/test/unit/caveat_v1_2.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v1_2.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v1_2.vtest" diff --git a/test/unit/caveat_v1_3.vtest.sh b/test/unit/caveat_v1_3.vtest.sh index b27ab09..356d6c8 100755 --- a/test/unit/caveat_v1_3.vtest.sh +++ b/test/unit/caveat_v1_3.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v1_3.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v1_3.vtest" diff --git a/test/unit/caveat_v1_4.vtest.sh b/test/unit/caveat_v1_4.vtest.sh index bbf01c2..62e486f 100755 --- a/test/unit/caveat_v1_4.vtest.sh +++ b/test/unit/caveat_v1_4.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v1_4.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v1_4.vtest" diff --git a/test/unit/caveat_v1_5.vtest.sh b/test/unit/caveat_v1_5.vtest.sh index 72f9115..51d69a7 100755 --- a/test/unit/caveat_v1_5.vtest.sh +++ b/test/unit/caveat_v1_5.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v1_5.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v1_5.vtest" diff --git a/test/unit/caveat_v1_6.vtest.sh b/test/unit/caveat_v1_6.vtest.sh index 000a44c..170e7bb 100755 --- a/test/unit/caveat_v1_6.vtest.sh +++ b/test/unit/caveat_v1_6.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v1_6.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v1_6.vtest" diff --git a/test/unit/caveat_v2_1.vtest.sh b/test/unit/caveat_v2_1.vtest.sh index 68f1116..efb10e8 100755 --- a/test/unit/caveat_v2_1.vtest.sh +++ b/test/unit/caveat_v2_1.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v2_1.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v2_1.vtest" diff --git a/test/unit/caveat_v2_2.vtest.sh b/test/unit/caveat_v2_2.vtest.sh index f781354..bcb8a7c 100755 --- a/test/unit/caveat_v2_2.vtest.sh +++ b/test/unit/caveat_v2_2.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v2_2.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v2_2.vtest" diff --git a/test/unit/caveat_v2_3.vtest.sh b/test/unit/caveat_v2_3.vtest.sh index 47c7468..27eefa0 100755 --- a/test/unit/caveat_v2_3.vtest.sh +++ b/test/unit/caveat_v2_3.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v2_3.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v2_3.vtest" diff --git a/test/unit/caveat_v2_4.vtest.sh b/test/unit/caveat_v2_4.vtest.sh index 42549af..9dbb51b 100755 --- a/test/unit/caveat_v2_4.vtest.sh +++ b/test/unit/caveat_v2_4.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v2_4.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v2_4.vtest" diff --git a/test/unit/caveat_v2_5.vtest.sh b/test/unit/caveat_v2_5.vtest.sh index d4aa5d8..497be13 100755 --- a/test/unit/caveat_v2_5.vtest.sh +++ b/test/unit/caveat_v2_5.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v2_5.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v2_5.vtest" diff --git a/test/unit/caveat_v2_6.vtest.sh b/test/unit/caveat_v2_6.vtest.sh index bb67dbe..b03887f 100755 --- a/test/unit/caveat_v2_6.vtest.sh +++ b/test/unit/caveat_v2_6.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/caveat_v2_6.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/caveat_v2_6.vtest" diff --git a/test/unit/root_v1_1.vtest.sh b/test/unit/root_v1_1.vtest.sh index ea2d41c..098a323 100755 --- a/test/unit/root_v1_1.vtest.sh +++ b/test/unit/root_v1_1.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/root_v1_1.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/root_v1_1.vtest" diff --git a/test/unit/root_v1_2.vtest.sh b/test/unit/root_v1_2.vtest.sh index 15ece53..de5884d 100755 --- a/test/unit/root_v1_2.vtest.sh +++ b/test/unit/root_v1_2.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/root_v1_2.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/root_v1_2.vtest" diff --git a/test/unit/root_v2_1.vtest.sh b/test/unit/root_v2_1.vtest.sh index cdc53de..e717655 100755 --- a/test/unit/root_v2_1.vtest.sh +++ b/test/unit/root_v2_1.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/root_v2_1.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/root_v2_1.vtest" diff --git a/test/unit/root_v2_2.vtest.sh b/test/unit/root_v2_2.vtest.sh index 03c0544..e6659d5 100755 --- a/test/unit/root_v2_2.vtest.sh +++ b/test/unit/root_v2_2.vtest.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-verifier < test/unit/root_v2_2.vtest +exec macaroon-test-verifier < "${MACAROONS_SRCDIR}/test/unit/root_v2_2.vtest" diff --git a/test/unit/serialization_1.sh b/test/unit/serialization_1.sh index fd846f3..4bbf7dd 100755 --- a/test/unit/serialization_1.sh +++ b/test/unit/serialization_1.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-serialization < test/unit/serialization_1 +exec macaroon-test-serialization < "${MACAROONS_SRCDIR}/test/unit/serialization_1" diff --git a/test/unit/serialization_2.sh b/test/unit/serialization_2.sh index 47d3f85..ad54eea 100755 --- a/test/unit/serialization_2.sh +++ b/test/unit/serialization_2.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-serialization < test/unit/serialization_2 +exec macaroon-test-serialization < "${MACAROONS_SRCDIR}/test/unit/serialization_2" diff --git a/test/unit/serialization_3.sh b/test/unit/serialization_3.sh index b90897a..68a53f3 100755 --- a/test/unit/serialization_3.sh +++ b/test/unit/serialization_3.sh @@ -1,2 +1,2 @@ #!/bin/sh -exec macaroon-test-serialization < test/unit/serialization_3 +exec macaroon-test-serialization < "${MACAROONS_SRCDIR}/test/unit/serialization_3"