From f23c614fbe850cef6e0dcd99618c0bd321f6af9c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 5 Apr 2010 21:40:14 +0000 Subject: [PATCH] config per script: --- src/fs/test_gnunet_fs_idx.py | 12 ++--- src/fs/test_gnunet_fs_idx_data.conf | 44 +++++++++++++++++++ src/fs/test_gnunet_fs_ns.py | 16 +++---- ..._data.conf => test_gnunet_fs_ns_data.conf} | 4 +- src/fs/test_gnunet_fs_psd.py | 12 ++--- src/fs/test_gnunet_fs_psd_data.conf | 44 +++++++++++++++++++ src/fs/test_gnunet_fs_rec.py | 10 ++--- src/fs/test_gnunet_fs_rec_data.conf | 44 +++++++++++++++++++ 8 files changed, 159 insertions(+), 27 deletions(-) create mode 100644 src/fs/test_gnunet_fs_idx_data.conf rename src/fs/{test_gnunet_fs_data.conf => test_gnunet_fs_ns_data.conf} (87%) create mode 100644 src/fs/test_gnunet_fs_psd_data.conf create mode 100644 src/fs/test_gnunet_fs_rec_data.conf diff --git a/src/fs/test_gnunet_fs_idx.py b/src/fs/test_gnunet_fs_idx.py index 277a397cc..402216e92 100755 --- a/src/fs/test_gnunet_fs_idx.py +++ b/src/fs/test_gnunet_fs_idx.py @@ -23,22 +23,22 @@ import os import signal import re -os.system ('rm -rf /tmp/gnunet-test-fs-py/') -os.system ('gnunet-arm -sq -c test_gnunet_fs_data.conf') +os.system ('rm -rf /tmp/gnunet-test-fs-py-idx/') +os.system ('gnunet-arm -sq -c test_gnunet_fs_idx_data.conf') try: - pub = pexpect.spawn ('gnunet-publish -c test_gnunet_fs_data.conf -m "description:The GNU Public License" -k gpl ../../COPYING') + pub = pexpect.spawn ('gnunet-publish -c test_gnunet_fs_idx_data.conf -m "description:The GNU Public License" -k gpl ../../COPYING') pub.expect ('Publishing `../../COPYING\' done.\r') pub.expect ("URI is `gnunet://fs/chk/PC0M19QMQC0BPSHR6BGA228PP6INER1D610MGEMOMEM87222FN8HVUO7PQGO0O9HD2GVLHF2N5IDHEQUNK6LKE428FPO96SKQEA486O.PG7K85JGQ6N599MD5HEP3CHEVFPKQD9JB6NPSLVA3T1SKDS66CFI499VS6MGQ88B0QUAVT1282TCRD4GGFVUKDLGI8F0SPIANA3J2LG.35147'.\r") pub.expect (pexpect.EOF) - down = pexpect.spawn ('gnunet-download -c test_gnunet_fs_data.conf -o \"COPYING\" gnunet://fs/chk/PC0M19QMQC0BPSHR6BGA228PP6INER1D610MGEMOMEM87222FN8HVUO7PQGO0O9HD2GVLHF2N5IDHEQUNK6LKE428FPO96SKQEA486O.PG7K85JGQ6N599MD5HEP3CHEVFPKQD9JB6NPSLVA3T1SKDS66CFI499VS6MGQ88B0QUAVT1282TCRD4GGFVUKDLGI8F0SPIANA3J2LG.35147') + down = pexpect.spawn ('gnunet-download -c test_gnunet_fs_idx_data.conf -o \"COPYING\" gnunet://fs/chk/PC0M19QMQC0BPSHR6BGA228PP6INER1D610MGEMOMEM87222FN8HVUO7PQGO0O9HD2GVLHF2N5IDHEQUNK6LKE428FPO96SKQEA486O.PG7K85JGQ6N599MD5HEP3CHEVFPKQD9JB6NPSLVA3T1SKDS66CFI499VS6MGQ88B0QUAVT1282TCRD4GGFVUKDLGI8F0SPIANA3J2LG.35147') down.expect (re.compile ("Downloading `COPYING\' done \(.*\).\r")); down.expect (pexpect.EOF); os.system ('rm COPYING'); - unindex = pexpect.spawn ('gnunet-unindex -c test_gnunet_fs_data.conf ../../COPYING') + unindex = pexpect.spawn ('gnunet-unindex -c test_gnunet_fs_idx_data.conf ../../COPYING') unindex.expect ('Unindexing done.\r') unindex.expect (pexpect.EOF) finally: - os.system ('gnunet-arm -c test_gnunet_fs_data.conf -eq') + os.system ('gnunet-arm -c test_gnunet_fs_idx_data.conf -eq') diff --git a/src/fs/test_gnunet_fs_idx_data.conf b/src/fs/test_gnunet_fs_idx_data.conf new file mode 100644 index 000000000..9a03e60de --- /dev/null +++ b/src/fs/test_gnunet_fs_idx_data.conf @@ -0,0 +1,44 @@ +[PATHS] +SERVICEHOME = /tmp/gnunet-test-fs-py-idx/ +DEFAULTCONFIG = test_gnunet_fs_idx_data.conf + +[gnunetd] +HOSTKEY = $SERVICEHOME/.hostkey + +[resolver] +PORT = 44464 +HOSTNAME = localhost + +[transport] +PORT = 44465 +PLUGINS = + +[arm] +PORT = 44466 +HOSTNAME = localhost +DEFAULTSERVICES = resolver datastore transport core statistics fs + +[datastore] +# DEBUG = YES + +[statistics] +PORT = 44467 +HOSTNAME = localhost + +[peerinfo] +PORT = 44469 +HOSTNAME = localhost + +[core] +PORT = 44470 +HOSTNAME = localhost + +[fs] +PORT = 44471 +HOSTNAME = localhost +#DEBUG = YES +#PREFIX = valgrind --tool=memcheck --leak-check=yes +#BINARY = /home/grothoff/bin/gnunet-service-fs + +[testing] +WEAKRANDOM = YES diff --git a/src/fs/test_gnunet_fs_ns.py b/src/fs/test_gnunet_fs_ns.py index a9b0b18bd..94043beaf 100755 --- a/src/fs/test_gnunet_fs_ns.py +++ b/src/fs/test_gnunet_fs_ns.py @@ -23,27 +23,27 @@ import os import signal import re -os.system ('rm -rf /tmp/gnunet-test-fs-py/') -os.system ('gnunet-arm -sq -c test_gnunet_fs_data.conf') +os.system ('rm -rf /tmp/gnunet-test-fs-py-ns/') +os.system ('gnunet-arm -sq -c test_gnunet_fs_ns_data.conf') try: - pseu = pexpect.spawn ('gnunet-pseudonym -c test_gnunet_fs_data.conf -C licenses -k gplad -m "description:Free Software Licenses" -r myroot') + pseu = pexpect.spawn ('gnunet-pseudonym -c test_gnunet_fs_ns_data.conf -C licenses -k gplad -m "description:Free Software Licenses" -r myroot') pseu.expect (pexpect.EOF) - pseu = pexpect.spawn ('gnunet-pseudonym -c test_gnunet_fs_data.conf -o') + pseu = pexpect.spawn ('gnunet-pseudonym -c test_gnunet_fs_ns_data.conf -o') pseu.expect (re.compile("licenses \(.*\)\r")) pseu.expect (pexpect.EOF) - pub = pexpect.spawn ('gnunet-publish -c test_gnunet_fs_data.conf -k licenses -P licenses -u gnunet://fs/chk/PC0M19QMQC0BPSHR6BGA228PP6INER1D610MGEMOMEM87222FN8HVUO7PQGO0O9HD2GVLHF2N5IDHEQUNK6LKE428FPO96SKQEA486O.PG7K85JGQ6N599MD5HEP3CHEVFPKQD9JB6NPSLVA3T1SKDS66CFI499VS6MGQ88B0QUAVT1282TCRD4GGFVUKDLGI8F0SPIANA3J2LG.35147 -t gpl -N gpl3') + pub = pexpect.spawn ('gnunet-publish -c test_gnunet_fs_ns_data.conf -k licenses -P licenses -u gnunet://fs/chk/PC0M19QMQC0BPSHR6BGA228PP6INER1D610MGEMOMEM87222FN8HVUO7PQGO0O9HD2GVLHF2N5IDHEQUNK6LKE428FPO96SKQEA486O.PG7K85JGQ6N599MD5HEP3CHEVFPKQD9JB6NPSLVA3T1SKDS66CFI499VS6MGQ88B0QUAVT1282TCRD4GGFVUKDLGI8F0SPIANA3J2LG.35147 -t gpl -N gpl3') pub.expect (pexpect.EOF) - search = pexpect.spawn ('gnunet-search -V -c test_gnunet_fs_data.conf gplad') + search = pexpect.spawn ('gnunet-search -V -c test_gnunet_fs_ns_data.conf gplad') search.expect (re.compile ("gnunet-download gnunet://fs/sks/.*/myroot\r")) search.expect (re.compile (" *description: Free Software Licenses\r")) search.kill (signal.SIGTERM) search.expect (pexpect.EOF) - pseu = pexpect.spawn ('gnunet-pseudonym -c test_gnunet_fs_data.conf') + pseu = pexpect.spawn ('gnunet-pseudonym -c test_gnunet_fs_ns_data.conf') pseu.expect (re.compile ("Free Software Licenses.*:\r")) pseu.expect (pexpect.EOF) finally: - os.system ('gnunet-arm -c test_gnunet_fs_data.conf -eq') + os.system ('gnunet-arm -c test_gnunet_fs_ns_data.conf -eq') diff --git a/src/fs/test_gnunet_fs_data.conf b/src/fs/test_gnunet_fs_ns_data.conf similarity index 87% rename from src/fs/test_gnunet_fs_data.conf rename to src/fs/test_gnunet_fs_ns_data.conf index 45cb9ae23..37e776a1c 100644 --- a/src/fs/test_gnunet_fs_data.conf +++ b/src/fs/test_gnunet_fs_ns_data.conf @@ -1,6 +1,6 @@ [PATHS] -SERVICEHOME = /tmp/gnunet-test-fs-py/ -DEFAULTCONFIG = test_gnunet_fs_data.conf +SERVICEHOME = /tmp/gnunet-test-fs-py-ns/ +DEFAULTCONFIG = test_gnunet_fs_ns_data.conf [gnunetd] HOSTKEY = $SERVICEHOME/.hostkey diff --git a/src/fs/test_gnunet_fs_psd.py b/src/fs/test_gnunet_fs_psd.py index 631fca8c8..75665178c 100755 --- a/src/fs/test_gnunet_fs_psd.py +++ b/src/fs/test_gnunet_fs_psd.py @@ -23,25 +23,25 @@ import os import signal import re -os.system ('rm -rf /tmp/gnunet-test-fs-py/') -os.system ('gnunet-arm -sq -c test_gnunet_fs_data.conf') +os.system ('rm -rf /tmp/gnunet-test-fs-py-psd/') +os.system ('gnunet-arm -sq -c test_gnunet_fs_psd_data.conf') try: # first, basic publish-search-download run - pub = pexpect.spawn ('gnunet-publish -n -c test_gnunet_fs_data.conf -m "description:The GNU Public License" -k gpl ../../COPYING') + pub = pexpect.spawn ('gnunet-publish -n -c test_gnunet_fs_psd_data.conf -m "description:The GNU Public License" -k gpl ../../COPYING') pub.expect ('Publishing `../../COPYING\' done.\r') pub.expect ("URI is `gnunet://fs/chk/PC0M19QMQC0BPSHR6BGA228PP6INER1D610MGEMOMEM87222FN8HVUO7PQGO0O9HD2GVLHF2N5IDHEQUNK6LKE428FPO96SKQEA486O.PG7K85JGQ6N599MD5HEP3CHEVFPKQD9JB6NPSLVA3T1SKDS66CFI499VS6MGQ88B0QUAVT1282TCRD4GGFVUKDLGI8F0SPIANA3J2LG.35147'.\r") pub.expect (pexpect.EOF) - search = pexpect.spawn ('gnunet-search -V -c test_gnunet_fs_data.conf gpl') + search = pexpect.spawn ('gnunet-search -V -c test_gnunet_fs_psd_data.conf gpl') search.expect ("gnunet-download -o \"COPYING\" gnunet://fs/chk/PC0M19QMQC0BPSHR6BGA228PP6INER1D610MGEMOMEM87222FN8HVUO7PQGO0O9HD2GVLHF2N5IDHEQUNK6LKE428FPO96SKQEA486O.PG7K85JGQ6N599MD5HEP3CHEVFPKQD9JB6NPSLVA3T1SKDS66CFI499VS6MGQ88B0QUAVT1282TCRD4GGFVUKDLGI8F0SPIANA3J2LG.35147\r") search.expect (re.compile (" *description: The GNU Public License\r")); search.kill (signal.SIGTERM) search.expect (pexpect.EOF) - down = pexpect.spawn ('gnunet-download -c test_gnunet_fs_data.conf -o \"COPYING\" gnunet://fs/chk/PC0M19QMQC0BPSHR6BGA228PP6INER1D610MGEMOMEM87222FN8HVUO7PQGO0O9HD2GVLHF2N5IDHEQUNK6LKE428FPO96SKQEA486O.PG7K85JGQ6N599MD5HEP3CHEVFPKQD9JB6NPSLVA3T1SKDS66CFI499VS6MGQ88B0QUAVT1282TCRD4GGFVUKDLGI8F0SPIANA3J2LG.35147') + down = pexpect.spawn ('gnunet-download -c test_gnunet_fs_psd_data.conf -o \"COPYING\" gnunet://fs/chk/PC0M19QMQC0BPSHR6BGA228PP6INER1D610MGEMOMEM87222FN8HVUO7PQGO0O9HD2GVLHF2N5IDHEQUNK6LKE428FPO96SKQEA486O.PG7K85JGQ6N599MD5HEP3CHEVFPKQD9JB6NPSLVA3T1SKDS66CFI499VS6MGQ88B0QUAVT1282TCRD4GGFVUKDLGI8F0SPIANA3J2LG.35147') down.expect (re.compile ("Downloading `COPYING\' done \(.*\).\r")); down.expect (pexpect.EOF); os.system ('rm COPYING'); finally: - os.system ('gnunet-arm -c test_gnunet_fs_data.conf -eq') + os.system ('gnunet-arm -c test_gnunet_fs_psd_data.conf -eq') diff --git a/src/fs/test_gnunet_fs_psd_data.conf b/src/fs/test_gnunet_fs_psd_data.conf new file mode 100644 index 000000000..3a76849af --- /dev/null +++ b/src/fs/test_gnunet_fs_psd_data.conf @@ -0,0 +1,44 @@ +[PATHS] +SERVICEHOME = /tmp/gnunet-test-fs-py-psd/ +DEFAULTCONFIG = test_gnunet_fs_psd_data.conf + +[gnunetd] +HOSTKEY = $SERVICEHOME/.hostkey + +[resolver] +PORT = 44464 +HOSTNAME = localhost + +[transport] +PORT = 44465 +PLUGINS = + +[arm] +PORT = 44466 +HOSTNAME = localhost +DEFAULTSERVICES = resolver datastore transport core statistics fs + +[datastore] +# DEBUG = YES + +[statistics] +PORT = 44467 +HOSTNAME = localhost + +[peerinfo] +PORT = 44469 +HOSTNAME = localhost + +[core] +PORT = 44470 +HOSTNAME = localhost + +[fs] +PORT = 44471 +HOSTNAME = localhost +#DEBUG = YES +#PREFIX = valgrind --tool=memcheck --leak-check=yes +#BINARY = /home/grothoff/bin/gnunet-service-fs + +[testing] +WEAKRANDOM = YES diff --git a/src/fs/test_gnunet_fs_rec.py b/src/fs/test_gnunet_fs_rec.py index a68ba13d6..cfc9eaa4c 100755 --- a/src/fs/test_gnunet_fs_rec.py +++ b/src/fs/test_gnunet_fs_rec.py @@ -23,16 +23,16 @@ import os import signal import re -os.system ('rm -rf /tmp/gnunet-test-fs-py/') -os.system ('gnunet-arm -sq -c test_gnunet_fs_data.conf') +os.system ('rm -rf /tmp/gnunet-test-fs-py-rec/') +os.system ('gnunet-arm -sq -c test_gnunet_fs_rec_data.conf') os.system ('tar xfz test_gnunet_fs_rec_data.tgz') try: - pub = pexpect.spawn ('gnunet-publish -c test_gnunet_fs_data.conf -d -k testdir dir/') + pub = pexpect.spawn ('gnunet-publish -c test_gnunet_fs_rec_data.conf -d -k testdir dir/') pub.expect ('Publishing `dir/\' done.\r') pub.expect ("URI is `gnunet://fs/chk/P5BPKNHH7CECDQA1A917G5EB67PPVG99NVO5QMJ8AJP2C02NM8O1ALNGOJPLLO0RMST0FNM0ATJV95PDAGATHDGH7AGIK2N3O0OOC70.OSG2JS3JDSI0AV8LMOL9MKPJ70DNG2RBL2CBTUCHK563VEM7L00RN8I2K0VPB459JRVBFOIKJG72LIQPDP9RFCVEVI37BUD76RJ3KK0.20169\'.") pub.expect (pexpect.EOF) - down = pexpect.spawn ('gnunet-download -c test_gnunet_fs_data.conf -R -o rdir.gnd gnunet://fs/chk/P5BPKNHH7CECDQA1A917G5EB67PPVG99NVO5QMJ8AJP2C02NM8O1ALNGOJPLLO0RMST0FNM0ATJV95PDAGATHDGH7AGIK2N3O0OOC70.OSG2JS3JDSI0AV8LMOL9MKPJ70DNG2RBL2CBTUCHK563VEM7L00RN8I2K0VPB459JRVBFOIKJG72LIQPDP9RFCVEVI37BUD76RJ3KK0.20169\'.') + down = pexpect.spawn ('gnunet-download -c test_gnunet_fs_rec_data.conf -R -o rdir.gnd gnunet://fs/chk/P5BPKNHH7CECDQA1A917G5EB67PPVG99NVO5QMJ8AJP2C02NM8O1ALNGOJPLLO0RMST0FNM0ATJV95PDAGATHDGH7AGIK2N3O0OOC70.OSG2JS3JDSI0AV8LMOL9MKPJ70DNG2RBL2CBTUCHK563VEM7L00RN8I2K0VPB459JRVBFOIKJG72LIQPDP9RFCVEVI37BUD76RJ3KK0.20169\'.') down.expect (re.compile ("Downloading `rdir.gnd\' done \(.*\).\r")); down.expect (pexpect.EOF); @@ -47,5 +47,5 @@ try: raise Exception ("Unexpected difference between source directory and downloaded result") finally: - os.system ('gnunet-arm -c test_gnunet_fs_data.conf -eq') + os.system ('gnunet-arm -c test_gnunet_fs_rec_data.conf -eq') os.system ('rm -r dir rdir rdir.gnd') diff --git a/src/fs/test_gnunet_fs_rec_data.conf b/src/fs/test_gnunet_fs_rec_data.conf new file mode 100644 index 000000000..93c5cffbc --- /dev/null +++ b/src/fs/test_gnunet_fs_rec_data.conf @@ -0,0 +1,44 @@ +[PATHS] +SERVICEHOME = /tmp/gnunet-test-fs-py-rec/ +DEFAULTCONFIG = test_gnunet_fs_rec_data.conf + +[gnunetd] +HOSTKEY = $SERVICEHOME/.hostkey + +[resolver] +PORT = 44464 +HOSTNAME = localhost + +[transport] +PORT = 44465 +PLUGINS = + +[arm] +PORT = 44466 +HOSTNAME = localhost +DEFAULTSERVICES = resolver datastore transport core statistics fs + +[datastore] +# DEBUG = YES + +[statistics] +PORT = 44467 +HOSTNAME = localhost + +[peerinfo] +PORT = 44469 +HOSTNAME = localhost + +[core] +PORT = 44470 +HOSTNAME = localhost + +[fs] +PORT = 44471 +HOSTNAME = localhost +#DEBUG = YES +#PREFIX = valgrind --tool=memcheck --leak-check=yes +#BINARY = /home/grothoff/bin/gnunet-service-fs + +[testing] +WEAKRANDOM = YES -- 2.25.1