SEBA-903 getting ip and port from make command line arguments instead of hardcoding
Change-Id: I0ff559fff6aa3a15b6110fb4c4d43280dc689789
diff --git a/demo_test/functional_test/Makefile b/demo_test/functional_test/Makefile
index 0775546..1b5ea3b 100644
--- a/demo_test/functional_test/Makefile
+++ b/demo_test/functional_test/Makefile
@@ -14,6 +14,7 @@
SHELL = /bin/bash
DEMOTESTDIR = ..
+DEMOTESTLOG = demotest.log
TESTSDIR = tests
TESTTAG = tc
TESTS := $(wildcard ${TESTSDIR}/*.$(TESTTAG))
@@ -26,27 +27,34 @@
ifeq ($(strip $(TESTS)),)
$(error no test found)
endif
-ifeq "$(and $(IP1),$(PORT1),$(IP2),$(PORT2))" ""
+ifeq "$(and $(IP1),$(PORT1),$(IP2),$(PORT2))" ""
$(error IP1, PORT1, IP2, and PORT2 are not all defined)
endif
+ADDR1 := $(shell printf '${IP1}:${PORT1}\n${IP2}:${PORT2}' | sort | sed -n '1 p')
+ADDR2 := $(shell printf '${IP1}:${PORT1}\n${IP2}:${PORT2}' | sort | sed -n '2 p')
+I1 := $(shell echo ${ADDR1} | cut -d ':' -f 1)
+P1 := $(shell echo ${ADDR1} | cut -d ':' -f 2)
+I2 := $(shell echo ${ADDR2} | cut -d ':' -f 1)
+P2 := $(shell echo ${ADDR2} | cut -d ':' -f 2)
demotest:
- @cd ${DEMOTESTDIR}; make demotest || exit 1; ./demotest & \
+ @cd ${DEMOTESTDIR}; make demotest || exit 1; ./demotest > ${DEMOTESTLOG} 2>&1 & \
sleep 2
dm: test_cli.go
go build -i -v -o $@
test: check-arg dm demotest $(TESTS) clean
- @echo "Alll tests passed!"
+ @echo "All tests passed!"
$(TESTS): ${TESTSDIR}/%.${TESTTAG}:
- @sed -e '/^\/\//d' -e 's/ip1/${IP1}/g; s/port1/${PORT1}/g; s/ip2/${IP2}/g; s/port2/${PORT2}/g' ${TESTSDIR}/$*.expected > ${TESTSDIR}/$*.e
+ @sed -e '/^\/\//d' -e 's/ip1/${I1}/g; s/port1/${P1}/g; s/ip2/${I2}/g; s/port2/${P2}/g' ${TESTSDIR}/$*.expected > ${TESTSDIR}/$*.e
# @sed -i '/^\/\//d' ${TESTSDIR}/$*.e
@echo "===== Running test $@"
- @./$@ $(IP1) $(PORT1) $(IP2) $(PORT2) > /dev/null > ${TESTSDIR}/$*.out
+ @./$@ $(I1) $(P1) $(I2) $(P2) > /dev/null > ${TESTSDIR}/$*.out
@diff -q ${TESTSDIR}/$*.out ${TESTSDIR}/$*.e || (pkill demotest; exit 1)
@rm ${TESTSDIR}/*.out ${TESTSDIR}/*.e
clean:
@pkill demotest
+ @rm ${DEMOTESTDIR}/${DEMOTESTLOG}
diff --git a/demo_test/functional_test/importer.robot b/demo_test/functional_test/importer.robot
index 4abcd60..1b10dab 100644
--- a/demo_test/functional_test/importer.robot
+++ b/demo_test/functional_test/importer.robot
@@ -1,4 +1,4 @@
-# Copyright 2017-present Open Networking Foundation
+# Copyright 2018 Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,16 +13,86 @@
# limitations under the License.
*** Settings ***
+Documentation Provide the function to perform funtional tests for the Redfish device-management project
+Suite Setup Get IP AND PORT
Library Process
Library OperatingSystem
+Library BuiltIn
+Library String
+Library Collections
+
+*** Variables ***
+@{ADDR_LIST} 192.168.4.26:8888 192.168.4.27:8888
*** Test Cases ***
-List Supported Events
- [Documentation] This test case excercises the API, GetEventList, which is expected to list all supported Redfish events.
- ${IP} set variable 192.168.4.26
- ${PORT} set variable 8888
- ${EXPECTED}= RUN sed -e '/^\\/\\//d' -e 's/ipaddr/${IP}:${PORT}/g' tests/list_supported_events.expected
- Run Process tests/list_supported_events.tc ${IP}:${PORT} shell=yes alias=myproc
- ${OUTPUT}= get process result myproc
+Add Device to Monitor
+ [Documentation] This test case excercises the API, SendDeviceList, which registers Redfish devices to monitor.
+ ${EXPECTED}= RUN sed -e '/^\\/\\//d' -e 's/ip1/${IP1}/g' -e 's/port1/${PORT1}/g' -e 's/ip2/${IP2}/g' -e 's/port2/${PORT2}/g' tests/add_device_to_monitor.expected
+ ${OUTPUT}= Run Process tests/add_device_to_monitor.tc ${IP1} ${PORT1} ${IP2} ${PORT2}
Should Be Equal ${EXPECTED} ${OUTPUT.stdout}
+Clear Subscribed Events
+ [Documentation] This test case excercises the API, ClearCurrentEventList, which clears all Redfish evets currently subscribed to.
+ ${EXPECTED}= RUN sed -e '/^\\/\\//d' -e 's/ip1/${IP1}/g' -e 's/port1/${PORT1}/g' tests/clear_all_subscribed_events.expected
+ ${OUTPUT}= Run Process tests/clear_all_subscribed_events.tc ${IP1} ${PORT1}
+ Should Be Equal ${EXPECTED} ${OUTPUT.stdout}
+
+Configure Data Polling Interval
+ [Documentation] This test case excercises the API, SetFrequency, which configures the interval of data polling.
+ ${EXPECTED}= RUN sed -e '/^\\/\\//d' -e 's/ip1/${IP1}/g' -e 's/port1/${PORT1}/g' tests/configure_data_polling_interval.expected
+ ${OUTPUT}= Run Process tests/configure_data_polling_interval.tc ${IP1} ${PORT1}
+ Should Be Equal ${EXPECTED} ${OUTPUT.stdout}
+
+Delete Monitored Device
+ [Documentation] This test case excercises the API, DeleteDeviceList, which deletes Redfish devices being monitored.
+ ${EXPECTED}= RUN sed -e '/^\\/\\//d' -e 's/ip1/${IP1}/g' -e 's/port1/${PORT1}/g' -e 's/ip2/${IP2}/g' -e 's/port2/${PORT2}/g' tests/delete_monitored_device.expected
+ ${OUTPUT}= Run Process tests/delete_monitored_device.tc ${IP1} ${PORT1} ${IP2} ${PORT2}
+ Should Be Equal ${EXPECTED} ${OUTPUT.stdout}
+
+List Devices monitored
+ [Documentation] This test case excercises the API, GetCurrentDevices, which lists all Redfish devices being monitored.
+ ${EXPECTED}= RUN sed -e '/^\\/\\//d' -e 's/ip1/${IP1}/g' -e 's/port1/${PORT1}/g' -e 's/ip2/${IP2}/g' -e 's/port2/${PORT2}/g' tests/list_device_monitored.expected
+ ${OUTPUT}= Run Process tests/list_device_monitored.tc ${IP1} ${PORT1} ${IP2} ${PORT2}
+ Should Be Equal ${EXPECTED} ${OUTPUT.stdout}
+
+List Subscribed Events
+ [Documentation] This test case excercises the API, GetCurrentEventList, which lists all Redfish evets currently subscribed to.
+ ${EXPECTED}= RUN sed -e '/^\\/\\//d' -e 's/ip1/${IP1}/g' -e 's/port1/${PORT1}/g' tests/list_subscribed_events.expected
+ ${OUTPUT}= Run Process tests/list_subscribed_events.tc ${IP1} ${PORT1}
+ Should Be Equal ${EXPECTED} ${OUTPUT.stdout}
+
+List Supported Events
+ [Documentation] This test case excercises the API, GetEventList, which lists all supported Redfish events.
+ ${EXPECTED}= RUN sed -e '/^\\/\\//d' -e 's/ip1/${IP1}/g' -e 's/port1/${PORT1}/g' tests/list_supported_events.expected
+ ${OUTPUT}= Run Process tests/list_supported_events.tc ${IP1} ${PORT1}
+ Should Be Equal ${EXPECTED} ${OUTPUT.stdout}
+
+Subscribe Events
+ [Documentation] This test case excercises the API, SubscribeGivenEvents, which subscribes to the specified events.
+ ${EXPECTED}= RUN sed -e '/^\\/\\//d' -e 's/ip1/${IP1}/g' -e 's/port1/${PORT1}/g' tests/subscribe_events.expected
+ ${OUTPUT}= Run Process tests/subscribe_events.tc ${IP1} ${PORT1}
+ Should Be Equal ${EXPECTED} ${OUTPUT.stdout}
+
+Unsubscribe Events
+ [Documentation] This test case excercises the API, UnsubscribeGivenEvents, which unsubscribes to the specified events.
+ ${EXPECTED}= RUN sed -e '/^\\/\\//d' -e 's/ip1/${IP1}/g' -e 's/port1/${PORT1}/g' tests/unsubscribe_events.expected
+ ${OUTPUT}= Run Process tests/unsubscribe_events.tc ${IP1} ${PORT1}
+ Should Be Equal ${EXPECTED} ${OUTPUT.stdout}
+
+Validate IP
+ [Documentation] This test case validates the format of IP, whcih is expected to be in the form of <ip>:<port>.
+ ${EXPECTED}= RUN sed -e '/^\\/\\//d' -e 's/ip1/${IP1}/g' -e 's/port1/${PORT1}/g' tests/validate_ip.expected
+ ${OUTPUT}= Run Process tests/validate_ip.tc ${IP1} ${PORT1}
+ Should Be Equal ${EXPECTED} ${OUTPUT.stdout}
+
+*** Keywords ***
+Get IP AND PORT
+ Sort List ${ADDR_LIST}
+ ${I1}= Fetch From LEFT ${ADDR_LIST}[0] :
+ Set Suite Variable ${IP1} ${I1}
+ ${P1}= Fetch From Right ${ADDR_LIST}[0] :
+ Set Suite Variable ${PORT1} ${P1}
+ ${I2}= Fetch From LEFT ${ADDR_LIST}[1] :
+ Set Suite Variable ${IP2} ${I2}
+ ${P2}= Fetch From Right ${ADDR_LIST}[1] :
+ Set Suite Variable ${PORT2} ${P2}
diff --git a/demo_test/functional_test/tests/clear_all_subscribed_events.expected b/demo_test/functional_test/tests/clear_all_subscribed_events.expected
index 25e732c..f05a3fd 100644
--- a/demo_test/functional_test/tests/clear_all_subscribed_events.expected
+++ b/demo_test/functional_test/tests/clear_all_subscribed_events.expected
@@ -11,8 +11,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-192.168.4.27:8888 attached
+ip1:port1 attached
Alert ResourceAdded ResourceRemoved
-192.168.4.27:8888 events cleared
+ip1:port1 events cleared
-192.168.4.27:8888 deleted
+ip1:port1 deleted
diff --git a/demo_test/functional_test/tests/clear_all_subscribed_events.tc b/demo_test/functional_test/tests/clear_all_subscribed_events.tc
index f5eef7a..b88f318 100755
--- a/demo_test/functional_test/tests/clear_all_subscribed_events.tc
+++ b/demo_test/functional_test/tests/clear_all_subscribed_events.tc
@@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-./dm attach 192.168.4.27:8888:120
-./dm showdeviceeventlist 192.168.4.27:8888
-./dm cleardeviceeventlist 192.168.4.27:8888
-./dm showdeviceeventlist 192.168.4.27:8888
-./dm delete 192.168.4.27:8888
+./dm attach $1:$2:120
+./dm showdeviceeventlist $1:$2
+./dm cleardeviceeventlist $1:$2
+./dm showdeviceeventlist $1:$2
+./dm delete $1:$2
diff --git a/demo_test/functional_test/tests/configure_data_polling_interval.expected b/demo_test/functional_test/tests/configure_data_polling_interval.expected
index b3e56c1..66e93bb 100644
--- a/demo_test/functional_test/tests/configure_data_polling_interval.expected
+++ b/demo_test/functional_test/tests/configure_data_polling_interval.expected
@@ -11,8 +11,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-192.168.4.27:8888 attached
+ip1:port1 attached
data collection interval configured to 30 seconds
Invalid interval
data collection interval configured to 0 seconds
-192.168.4.27:8888 deleted
+ip1:port1 deleted
diff --git a/demo_test/functional_test/tests/configure_data_polling_interval.tc b/demo_test/functional_test/tests/configure_data_polling_interval.tc
index 0939a79..01202ce 100755
--- a/demo_test/functional_test/tests/configure_data_polling_interval.tc
+++ b/demo_test/functional_test/tests/configure_data_polling_interval.tc
@@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-./dm attach 192.168.4.27:8888:120
-./dm period 192.168.4.27:8888:30
-./dm period 192.168.4.27:8888:3
-./dm period 192.168.4.27:8888:0
-./dm delete 192.168.4.27:8888
+./dm attach $1:$2:120
+./dm period $1:$2:30
+./dm period $1:$2:3
+./dm period $1:$2:0
+./dm delete $1:$2
diff --git a/demo_test/functional_test/tests/delete_monitored_device.expected b/demo_test/functional_test/tests/delete_monitored_device.expected
index 8e1cc31..65763d9 100644
--- a/demo_test/functional_test/tests/delete_monitored_device.expected
+++ b/demo_test/functional_test/tests/delete_monitored_device.expected
@@ -11,6 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-192.168.4.26:8888 192.168.4.27:8888 attached
-192.168.4.26:8888 192.168.4.27:8888 deleted
-Device 192.168.4.27:8888 not found
+ip1:port1 ip2:port2 attached
+ip1:port1 ip2:port2 deleted
+Device ip1:port1 not found
diff --git a/demo_test/functional_test/tests/delete_monitored_device.tc b/demo_test/functional_test/tests/delete_monitored_device.tc
index 7860e0b..7c99273 100755
--- a/demo_test/functional_test/tests/delete_monitored_device.tc
+++ b/demo_test/functional_test/tests/delete_monitored_device.tc
@@ -14,6 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-./dm attach 192.168.4.27:8888:120 192.168.4.26:8888:100
-./dm delete 192.168.4.27:8888 192.168.4.26:8888
-./dm delete 192.168.4.27:8888
+./dm attach $1:$2:120 $3:$4:100
+./dm delete $1:$2 $3:$4
+./dm delete $1:$2
diff --git a/demo_test/functional_test/tests/list_device_monitored.expected b/demo_test/functional_test/tests/list_device_monitored.expected
index 2f98be3..4acf927 100644
--- a/demo_test/functional_test/tests/list_device_monitored.expected
+++ b/demo_test/functional_test/tests/list_device_monitored.expected
@@ -12,6 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
No Device found
-192.168.4.26:8888 192.168.4.27:8888 attached
-192.168.4.26:8888 192.168.4.27:8888
-192.168.4.26:8888 192.168.4.27:8888 deleted
+ip1:port1 ip2:port2 attached
+ip1:port1 ip2:port2
+ip1:port1 ip2:port2 deleted
diff --git a/demo_test/functional_test/tests/list_device_monitored.tc b/demo_test/functional_test/tests/list_device_monitored.tc
index 0016968..5e4bc01 100755
--- a/demo_test/functional_test/tests/list_device_monitored.tc
+++ b/demo_test/functional_test/tests/list_device_monitored.tc
@@ -15,6 +15,6 @@
# limitations under the License.
./dm showdevices
-./dm attach 192.168.4.26:8888:120 192.168.4.27:8888:100
+./dm attach $1:$2:120 $3:$4:100
./dm showdevices
-./dm delete 192.168.4.26:8888 192.168.4.27:8888
+./dm delete $1:$2 $3:$4
diff --git a/demo_test/functional_test/tests/list_subscribed_events.expected b/demo_test/functional_test/tests/list_subscribed_events.expected
index ad6f141..0b07d01 100644
--- a/demo_test/functional_test/tests/list_subscribed_events.expected
+++ b/demo_test/functional_test/tests/list_subscribed_events.expected
@@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-Device 192.168.4.26:8888 not registered
-192.168.4.26:8888 attached
+Device ip1:port1 not registered
+ip1:port1 attached
Alert ResourceAdded ResourceRemoved
-192.168.4.26:8888 deleted
+ip1:port1 deleted
diff --git a/demo_test/functional_test/tests/list_subscribed_events.tc b/demo_test/functional_test/tests/list_subscribed_events.tc
index 819aaeb..47f47e4 100755
--- a/demo_test/functional_test/tests/list_subscribed_events.tc
+++ b/demo_test/functional_test/tests/list_subscribed_events.tc
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-./dm showdeviceeventlist 192.168.4.26:8888
-./dm attach 192.168.4.26:8888:120
-./dm showdeviceeventlist 192.168.4.26:8888
-./dm delete 192.168.4.26:8888
+./dm showdeviceeventlist $1:$2
+./dm attach $1:$2:120
+./dm showdeviceeventlist $1:$2
+./dm delete $1:$2
diff --git a/demo_test/functional_test/tests/list_supported_events.expected b/demo_test/functional_test/tests/list_supported_events.expected
index 27a563f..0b07d01 100644
--- a/demo_test/functional_test/tests/list_supported_events.expected
+++ b/demo_test/functional_test/tests/list_supported_events.expected
@@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-Device 192.168.4.27:8888 not registered
-192.168.4.26:8888 attached
+Device ip1:port1 not registered
+ip1:port1 attached
Alert ResourceAdded ResourceRemoved
-192.168.4.26:8888 deleted
+ip1:port1 deleted
diff --git a/demo_test/functional_test/tests/list_supported_events.tc b/demo_test/functional_test/tests/list_supported_events.tc
index dff2eed..8f23e06 100755
--- a/demo_test/functional_test/tests/list_supported_events.tc
+++ b/demo_test/functional_test/tests/list_supported_events.tc
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-./dm showeventlist 192.168.4.27:8888
-./dm attach 192.168.4.26:8888:120
-./dm showeventlist 192.168.4.26:8888
-./dm delete 192.168.4.26:8888
+./dm showeventlist $1:$2
+./dm attach $1:$2:120
+./dm showeventlist $1:$2
+./dm delete $1:$2
diff --git a/demo_test/functional_test/tests/subscribe_events.expected b/demo_test/functional_test/tests/subscribe_events.expected
index 73e9325..1778144 100644
--- a/demo_test/functional_test/tests/subscribe_events.expected
+++ b/demo_test/functional_test/tests/subscribe_events.expected
@@ -11,9 +11,9 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-Device 192.168.4.27:8888 not registered
-192.168.4.27:8888 attached
+Device ip1:port1 not registered
+ip1:port1 attached
Alert ResourceAdded ResourceRemoved
event ResourceAdded already subscribed
event Update not supported
-192.168.4.27:8888 deleted
+ip1:port1 deleted
diff --git a/demo_test/functional_test/tests/subscribe_events.tc b/demo_test/functional_test/tests/subscribe_events.tc
index 41abd92..ef108e9 100755
--- a/demo_test/functional_test/tests/subscribe_events.tc
+++ b/demo_test/functional_test/tests/subscribe_events.tc
@@ -14,9 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-./dm sub 192.168.4.27:8888:add
-./dm attach 192.168.4.27:8888:120
-./dm showdeviceeventlist 192.168.4.27:8888
-./dm sub 192.168.4.27:8888:add
-./dm sub 192.168.4.27:8888:update
-./dm delete 192.168.4.27:8888
+./dm sub $1:$2:add
+./dm attach $1:$2:120
+./dm showdeviceeventlist $1:$2
+./dm sub $1:$2:add
+./dm sub $1:$2:update
+./dm delete $1:$2
diff --git a/demo_test/functional_test/tests/unsubscribe_events.expected b/demo_test/functional_test/tests/unsubscribe_events.expected
index eee0d10..fd1b1cb 100644
--- a/demo_test/functional_test/tests/unsubscribe_events.expected
+++ b/demo_test/functional_test/tests/unsubscribe_events.expected
@@ -11,11 +11,11 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-Device 192.168.4.27:8888 not registered
-192.168.4.27:8888 attached
+Device ip1:port1 not registered
+ip1:port1 attached
Alert ResourceAdded ResourceRemoved
unsub successful
Alert ResourceRemoved
event ResourceAdded not found
event Update not found
-192.168.4.27:8888 deleted
+ip1:port1 deleted
diff --git a/demo_test/functional_test/tests/unsubscribe_events.tc b/demo_test/functional_test/tests/unsubscribe_events.tc
index df9d440..96d069a 100755
--- a/demo_test/functional_test/tests/unsubscribe_events.tc
+++ b/demo_test/functional_test/tests/unsubscribe_events.tc
@@ -14,11 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-./dm unsub 192.168.4.27:8888:add
-./dm attach 192.168.4.27:8888:120
-./dm showdeviceeventlist 192.168.4.27:8888
-./dm unsub 192.168.4.27:8888:add
-./dm showdeviceeventlist 192.168.4.27:8888
-./dm unsub 192.168.4.27:8888:add
-./dm unsub 192.168.4.27:8888:update
-./dm delete 192.168.4.27:8888
+./dm unsub $1:$2:add
+./dm attach $1:$2:120
+./dm showdeviceeventlist $1:$2
+./dm unsub $1:$2:add
+./dm showdeviceeventlist $1:$2
+./dm unsub $1:$2:add
+./dm unsub $1:$2:update
+./dm delete $1:$2
diff --git a/demo_test/functional_test/tests/validate_ip.expected b/demo_test/functional_test/tests/validate_ip.expected
index ab281ef..d4f0fc3 100644
--- a/demo_test/functional_test/tests/validate_ip.expected
+++ b/demo_test/functional_test/tests/validate_ip.expected
@@ -14,4 +14,4 @@
Incorrect IP address format (<ip>:<port #>)
Invalid IP address 192.168.4
Port # 8a needs to be an integer
-Device 192.168.4.27:8888 not registered
+Device ip1:port1 not registered
diff --git a/demo_test/functional_test/tests/validate_ip.tc b/demo_test/functional_test/tests/validate_ip.tc
index 64bdd39..de13243 100755
--- a/demo_test/functional_test/tests/validate_ip.tc
+++ b/demo_test/functional_test/tests/validate_ip.tc
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-./dm showeventlist 192.168.4.27
+./dm showeventlist $1
./dm showeventlist 192.168.4:8
-./dm showeventlist 192.168.4.27:8a
-./dm showeventlist 192.168.4.27:8888
+./dm showeventlist $1:8a
+./dm showeventlist $1:$2