Package: lua-sec / 0.5-1

0001-test.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From: Enrico Tassi <gareuselesinge@debian.org>
Date: Fri, 9 Aug 2013 17:47:14 +0200
Subject: test

---
 test.lua |  2 ++
 test.sh  | 13 +++++++++++++
 2 files changed, 15 insertions(+)
 create mode 100644 test.lua
 create mode 100644 test.sh

diff --git a/test.lua b/test.lua
new file mode 100644
index 0000000..b80247f
--- /dev/null
+++ b/test.lua
@@ -0,0 +1,2 @@
+rc=os.execute("sh test.sh")
+if type(rc) == "boolean" then if rc then rc=0 else rc=1 end; end; os.exit(rc)
diff --git a/test.sh b/test.sh
new file mode 100644
index 0000000..b14082e
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+set -x
+
+cd samples/oneshot/
+
+lua server.lua &
+sleep 1
+lua client.lua &
+sleep 3
+kill -9 %1 || true
+kill -9 %2 || true