diff mbox

[OpenWrt-Devel,1/3] testenv: test for exit status of "uci export".

Message ID 1425741466-29090-1-git-send-email-yszhou4tech@gmail.com
State Superseded
Delegated to: Felix Fietkau
Headers show

Commit Message

Yousong Zhou March 7, 2015, 3:17 p.m. UTC
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
---
 test/tests.d/010_export |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Yousong Zhou March 7, 2015, 3:17 p.m. UTC | #1
The 2nd patch fixes a regression introduced lately.

The 3rd one fixes the following code in LuCI [1].

	local uci = require 'uci'
	cursor = uci.cursor

I tested them on BB branch, but not sure why the bug was not triggered before
since the code has been there for quite a long time.

 [1] https://github.com/openwrt/luci/blob/master/modules/luci-base/luasrc/model/uci.lua#L5

Yousong Zhou (2):
  cli: fix return value of package_cmd().
  lua: return module table instead of boolean value on require('uci').

 cli.c     |    2 ++
 lua/uci.c |    3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/test/tests.d/010_export b/test/tests.d/010_export
index 259f988..beb0f6c 100644
--- a/test/tests.d/010_export
+++ b/test/tests.d/010_export
@@ -1,6 +1,14 @@ 
 test_export ()
 {
 	cp ${REF_DIR}/export.data ${CONFIG_DIR}/export
+
+	${UCI_Q} export nilpackage
+	assertFalse $?
+
+	${UCI_Q} export export 1>/dev/null 2>&1
+	assertTrue $?
+
 	${UCI} export > ${TMP_DIR}/export.result
-	assertSameFile ${REF_DIR}/export.result ${TMP_DIR}/export.result
+	assertTrue $?
+	#assertSameFile ${REF_DIR}/export.result ${TMP_DIR}/export.result
 }