File: 0001-test.patch

package info (click to toggle)
lua-sec 1.3.2-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 740 kB
  • sloc: ansic: 3,807; makefile: 108; sh: 63
file content (39 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (4)
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
39
From: Enrico Tassi <gareuselesinge@debian.org>
Date: Fri, 9 Aug 2013 17:47:14 +0200
Subject: test

---
 test.lua |  2 ++
 test.sh  | 14 ++++++++++++++
 2 files changed, 16 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..7681667
--- /dev/null
+++ b/test.lua
@@ -0,0 +1,2 @@
+rc=os.execute("sh test.sh " .. arg[1])
+if rc == true then os.exit(0) elseif rc== 0 then os.exit(0) else os.exit(1); end
diff --git a/test.sh b/test.sh
new file mode 100644
index 0000000..dbb2e1c
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+set -x
+set -m
+
+cd samples/oneshot/
+
+lua$1 server.lua &
+sleep 1
+ret=0
+lua$1 client.lua || ret=$?
+kill -9 %1 || true
+exit $ret