summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites
diff options
context:
space:
mode:
Diffstat (limited to 'fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites')
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/__init__.py0
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/01-install/__init__.py0
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/01-install/case.py94
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/02-request/__init__.py0
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/02-request/case.py73
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/03-event/__init__.py0
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/03-event/case.py67
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/04-request-internal/__init__.py0
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/04-request-internal/case.py80
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/05-event-internal/__init__.py0
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/05-event-internal/case.py70
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/06-timer/__init__.py0
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/06-timer/case.py70
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/07-sensor/__init__.py0
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/07-sensor/case.py65
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/08-on-destroy/__init__.py0
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/08-on-destroy/case.py78
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/__init__.py0
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/suite_setup.py56
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/01_install.c19
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/02_request.c68
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/03_event.c59
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/04_request_internal_req.c74
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/04_request_internal_resp.c57
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/05_event_internal_provider.c59
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/05_event_internal_subscriber.c56
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/06_timer.c80
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/07_sensor.c74
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/08_on_destroy.c70
-rwxr-xr-xfluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/build.sh39
-rwxr-xr-xfluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/tools/product/start.sh10
-rwxr-xr-xfluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/tools/product/stop.sh9
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/__init__.py0
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/readme.txt19
34 files changed, 0 insertions, 1346 deletions
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/__init__.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/__init__.py
+++ /dev/null
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/01-install/__init__.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/01-install/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/01-install/__init__.py
+++ /dev/null
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/01-install/case.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/01-install/case.py
deleted file mode 100644
index b8d2c38b8..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/01-install/case.py
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-
-import sys
-import time
-import random
-import logging
-import json
-
-from framework.case_base import *
-from framework.test_api import *
-from harness.harness_api import *
-
-class CTestCase(CTestCaseBase):
- def __init__(self, suite):
- CTestCaseBase.__init__(self, suite)
-
- def get_case_name(self):
- case_path = os.path.dirname(os.path.abspath( __file__ ))
- return os.path.split(case_path)[1]
-
- def on_get_case_description(self):
- return "startup the executables"
-
- def on_setup_case(self):
- os.chdir(self.get_case_name())
- start_env()
- api_log_error("on_setup_case OK")
- return True, ''
-
- def on_cleanup_case(self):
- stop_env()
- api_log_error("on_cleanup_case OK")
- return True, ''
-
- # called by the framework
- def on_run_case(self):
- time.sleep(0.5)
-
- #uninstall inexistent App1
- ret = uninstall_app("App1")
- if (ret != 160):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps([])
- if (ret == False):
- return False, ''
-
- #install App1
- ret = install_app("App1", "01_install.wasm")
- if (ret != 65):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps(["App1"])
- if (ret == False):
- return False, ''
-
- #install App2
- ret = install_app("App2", "01_install.wasm")
- if (ret != 65):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps(["App1","App2"])
- if (ret == False):
- return False, ''
-
- #uninstall App2
- ret = uninstall_app("App2")
- if (ret != 66):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps(["App1"])
- if (ret == False):
- return False, ''
-
- return True, ''
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/02-request/__init__.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/02-request/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/02-request/__init__.py
+++ /dev/null
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/02-request/case.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/02-request/case.py
deleted file mode 100644
index e2192d5fa..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/02-request/case.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-
-import sys
-import time
-import random
-import logging
-import json
-
-from framework.case_base import *
-from framework.test_api import *
-from harness.harness_api import *
-
-class CTestCase(CTestCaseBase):
- def __init__(self, suite):
- CTestCaseBase.__init__(self, suite)
-
- def get_case_name(self):
- case_path = os.path.dirname(os.path.abspath( __file__ ))
- return os.path.split(case_path)[1]
-
- def on_get_case_description(self):
- return "startup the executables"
-
- def on_setup_case(self):
- os.chdir(self.get_case_name())
- start_env()
- api_log_error("on_setup_case OK")
- return True, ''
-
- def on_cleanup_case(self):
- stop_env()
- api_log_error("on_cleanup_case OK")
- return True, ''
-
- # called by the framework
- def on_run_case(self):
- time.sleep(0.5)
-
- #install App1
- ret = install_app("App1", "02_request.wasm")
- if (ret != 65):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps(["App1"])
- if (ret == False):
- return False, ''
-
- #send request to App1
- ret = send_request("/res1", "GET", None)
- if (ret != 69):
- return False, ''
- expect_response_payload = {"key1":"value1","key2":"value2"}
- ret = check_response_payload(expect_response_payload)
- if (ret == False):
- return False, ''
-
- #send request to App1
- ret = send_request("/res2", "DELETE", None)
- if (ret != 66):
- return False, ''
- expect_response_payload = {}
- ret = check_response_payload(expect_response_payload)
- if (ret == False):
- return False, ''
-
- return True, ''
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/03-event/__init__.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/03-event/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/03-event/__init__.py
+++ /dev/null
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/03-event/case.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/03-event/case.py
deleted file mode 100644
index 3886cb820..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/03-event/case.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-import sys
-import time
-import random
-import logging
-import json
-
-from framework.case_base import *
-from framework.test_api import *
-from harness.harness_api import *
-
-class CTestCase(CTestCaseBase):
- def __init__(self, suite):
- CTestCaseBase.__init__(self, suite)
-
- def get_case_name(self):
- case_path = os.path.dirname(os.path.abspath( __file__ ))
- return os.path.split(case_path)[1]
-
- def on_get_case_description(self):
- return "startup the executables"
-
- def on_setup_case(self):
- os.chdir(self.get_case_name())
- start_env()
- api_log_error("on_setup_case OK")
- return True, ''
-
- def on_cleanup_case(self):
- stop_env()
- api_log_error("on_cleanup_case OK")
- return True, ''
-
- # called by the framework
- def on_run_case(self):
- time.sleep(0.5)
-
- #install App1
- ret = install_app("App1", "03_event.wasm")
- if (ret != 65):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps(["App1"])
- if (ret == False):
- return False, ''
-
- #register event
- ret = register("/alert/overheat", 2000, 5000)
- if (ret != 69):
- return False, ''
- ret = check_get_event()
- if (ret == False):
- return False, ''
-
- #deregister event
- ret = deregister("/alert/overheat")
- if (ret != 69):
- return False, ''
-
- return True, ''
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/04-request-internal/__init__.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/04-request-internal/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/04-request-internal/__init__.py
+++ /dev/null
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/04-request-internal/case.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/04-request-internal/case.py
deleted file mode 100644
index bf395f58b..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/04-request-internal/case.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-
-import sys
-import time
-import random
-import logging
-import json
-
-from framework.case_base import *
-from framework.test_api import *
-from harness.harness_api import *
-
-class CTestCase(CTestCaseBase):
- def __init__(self, suite):
- CTestCaseBase.__init__(self, suite)
-
- def get_case_name(self):
- case_path = os.path.dirname(os.path.abspath( __file__ ))
- return os.path.split(case_path)[1]
-
- def on_get_case_description(self):
- return "startup the executables"
-
- def on_setup_case(self):
- os.chdir(self.get_case_name())
- start_env()
- api_log_error("on_setup_case OK")
- return True, ''
-
- def on_cleanup_case(self):
- stop_env()
- api_log_error("on_cleanup_case OK")
- return True, ''
-
- # called by the framework
- def on_run_case(self):
- time.sleep(0.5)
-
- #install App1
- ret = install_app("App1", "04_request_internal_resp.wasm")
- if (ret != 65):
- return False, ''
-
- #install App2
- ret = install_app("App2", "04_request_internal_req.wasm")
- if (ret != 65):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps(["App1","App2"])
- if (ret == False):
- return False, ''
-
- #send request to App2
- ret = send_request("/res1", "GET", None)
- if (ret != 69):
- return False, ''
- time.sleep(2)
- expect_response_payload = {"key1":"value1","key2":"value2"}
- ret = check_response_payload(expect_response_payload)
- if (ret == False):
- return False, ''
-
- #send request to App2
- ret = send_request("/res2", "GET", None)
- if (ret != 69):
- return False, ''
- time.sleep(2)
- expect_response_payload = {"key1":"value1","key2":"value2"}
- ret = check_response_payload(expect_response_payload)
- if (ret == False):
- return False, ''
-
- return True, ''
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/05-event-internal/__init__.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/05-event-internal/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/05-event-internal/__init__.py
+++ /dev/null
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/05-event-internal/case.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/05-event-internal/case.py
deleted file mode 100644
index 79c328749..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/05-event-internal/case.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-
-import sys
-import time
-import random
-import logging
-import json
-
-from framework.case_base import *
-from framework.test_api import *
-from harness.harness_api import *
-
-class CTestCase(CTestCaseBase):
- def __init__(self, suite):
- CTestCaseBase.__init__(self, suite)
-
- def get_case_name(self):
- case_path = os.path.dirname(os.path.abspath( __file__ ))
- return os.path.split(case_path)[1]
-
- def on_get_case_description(self):
- return "startup the executables"
-
- def on_setup_case(self):
- os.chdir(self.get_case_name())
- start_env()
- api_log_error("on_setup_case OK")
- return True, ''
-
- def on_cleanup_case(self):
- stop_env()
- api_log_error("on_cleanup_case OK")
- return True, ''
-
- # called by the framework
- def on_run_case(self):
- time.sleep(0.5)
-
- #install App1
- ret = install_app("App1", "05_event_internal_provider.wasm")
- if (ret != 65):
- return False, ''
-
- #install App2
- ret = install_app("App2", "05_event_internal_subscriber.wasm")
- if (ret != 65):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps(["App1","App2"])
- if (ret == False):
- return False, ''
-
- #send request to App2
- ret = send_request("/res1", "GET", None)
- if (ret != 69):
- return False, ''
- time.sleep(2)
- expect_response_payload = {"key1":"value1","key2":"value2"}
- ret = check_response_payload(expect_response_payload)
- if (ret == False):
- return False, ''
-
- return True, ''
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/06-timer/__init__.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/06-timer/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/06-timer/__init__.py
+++ /dev/null
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/06-timer/case.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/06-timer/case.py
deleted file mode 100644
index 90af4d5d9..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/06-timer/case.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-
-import sys
-import time
-import random
-import logging
-import json
-
-from framework.case_base import *
-from framework.test_api import *
-from harness.harness_api import *
-
-class CTestCase(CTestCaseBase):
- def __init__(self, suite):
- CTestCaseBase.__init__(self, suite)
-
- def get_case_name(self):
- case_path = os.path.dirname(os.path.abspath( __file__ ))
- return os.path.split(case_path)[1]
-
- def on_get_case_description(self):
- return "startup the executables"
-
- def on_setup_case(self):
- os.chdir(self.get_case_name())
- start_env()
- api_log_error("on_setup_case OK")
- return True, ''
-
- def on_cleanup_case(self):
- stop_env()
- api_log_error("on_cleanup_case OK")
- return True, ''
-
- # called by the framework
- def on_run_case(self):
- time.sleep(0.5)
-
- #install App1
- ret = install_app("App1", "06_timer.wasm")
- if (ret != 65):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps(["App1"])
- if (ret == False):
- return False, ''
-
- #send request to App1
- ret = send_request("/res1", "GET", None)
- if (ret != 69):
- return False, ''
-
- time.sleep(3)
-
- ret = send_request("/check_timer", "GET", None)
- if (ret != 69):
- return False, ''
- expect_response_payload = {"num":2}
- ret = check_response_payload(expect_response_payload)
- if (ret == False):
- return False, ''
-
- return True, ''
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/07-sensor/__init__.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/07-sensor/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/07-sensor/__init__.py
+++ /dev/null
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/07-sensor/case.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/07-sensor/case.py
deleted file mode 100644
index 2bb756203..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/07-sensor/case.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-
-import sys
-import time
-import random
-import logging
-import json
-
-from framework.case_base import *
-from framework.test_api import *
-from harness.harness_api import *
-
-class CTestCase(CTestCaseBase):
- def __init__(self, suite):
- CTestCaseBase.__init__(self, suite)
-
- def get_case_name(self):
- case_path = os.path.dirname(os.path.abspath( __file__ ))
- return os.path.split(case_path)[1]
-
- def on_get_case_description(self):
- return "startup the executables"
-
- def on_setup_case(self):
- os.chdir(self.get_case_name())
- start_env()
- api_log_error("on_setup_case OK")
- return True, ''
-
- def on_cleanup_case(self):
- stop_env()
- api_log_error("on_cleanup_case OK")
- return True, ''
-
- # called by the framework
- def on_run_case(self):
- time.sleep(0.5)
-
- #install App1
- ret = install_app("App1", "07_sensor.wasm")
- if (ret != 65):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps(["App1"])
- if (ret == False):
- return False, ''
-
- #send request to App1
- ret = send_request("/res1", "GET", None)
- if (ret != 69):
- return False, ''
- time.sleep(2)
- expect_response_payload = {"key1":"value1","key2":"value2"}
- ret = check_response_payload(expect_response_payload)
- if (ret == False):
- return False, ''
-
- return True, ''
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/08-on-destroy/__init__.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/08-on-destroy/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/08-on-destroy/__init__.py
+++ /dev/null
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/08-on-destroy/case.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/08-on-destroy/case.py
deleted file mode 100644
index 99a4512ee..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/08-on-destroy/case.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-
-import sys
-import time
-import random
-import logging
-import json
-
-from framework.case_base import *
-from framework.test_api import *
-from harness.harness_api import *
-
-class CTestCase(CTestCaseBase):
- def __init__(self, suite):
- CTestCaseBase.__init__(self, suite)
-
- def get_case_name(self):
- case_path = os.path.dirname(os.path.abspath( __file__ ))
- return os.path.split(case_path)[1]
-
- def on_get_case_description(self):
- return "startup the executables"
-
- def on_setup_case(self):
- os.chdir(self.get_case_name())
- start_env()
- api_log_error("on_setup_case OK")
- return True, ''
-
- def on_cleanup_case(self):
- stop_env()
- api_log_error("on_cleanup_case OK")
- return True, ''
-
- # called by the framework
- def on_run_case(self):
- time.sleep(0.5)
-
- #install App1
- ret = install_app("App1", "08_on_destroy.wasm")
- if (ret != 65):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps(["App1"])
- if (ret == False):
- return False, ''
-
- #send request to App1
- ret = send_request("/res1", "GET", None)
- if (ret != 69):
- return False, ''
- time.sleep(2)
- expect_response_payload = {"key1":"value1"}
- ret = check_response_payload(expect_response_payload)
- if (ret == False):
- return False, ''
-
- #uninstall App1
- ret = uninstall_app("App1")
- if (ret != 66):
- return False, ''
-
- #query Apps
- ret = query_app()
- if (ret != 69):
- return False, ''
- ret = check_query_apps([])
- if (ret == False):
- return False, ''
-
- return True, ''
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/__init__.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/cases/__init__.py
+++ /dev/null
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/suite_setup.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/suite_setup.py
deleted file mode 100644
index 2307186f7..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/suite_setup.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-
-import os
-import shutil
-import types
-import time
-import glob
-
-from framework.test_api import *
-from framework.test_utils import *
-from harness.harness_api import *
-from framework.suite import *
-
-class CTestSuite(CTestSuiteBase):
- setup_path = ""
- def __init__(self, name, suite_path, run_path):
- CTestSuiteBase.__init__(self, name, suite_path, run_path)
-
- def on_suite_setup(self):
- global setup_path
- setup_path = os.getcwd()
- cases = os.listdir(self.suite_path + "/cases/")
- cases.sort()
-
- if api_get_value("rebuild", False):
- path_tmp = os.getcwd()
- os.chdir(self.suite_path + "/test-app")
- os.system(self.suite_path + "/test-app" + "/build.sh")
- os.chdir(path_tmp)
-
- os.makedirs(self.run_path + "/test-app")
-
- for case in cases:
- if case != "__init__.pyc" and case != "__init__.py":
- os.makedirs(self.run_path + "/" + case)
- #copy each case's host_tool, simple, wasm files, start/stop scripts to the run directory,
- shutil.copy(setup_path + "/../../samples/simple/out/simple", self.run_path + "/" + case)
- shutil.copy(setup_path + "/../../samples/simple/out/host_tool", self.run_path + "/" + case)
- for file in glob.glob(self.suite_path + "/test-app/" + "/*.wasm"):
- shutil.copy(file, self.run_path + "/test-app")
- shutil.copy(self.suite_path + "/tools/product/start.sh", self.run_path + "/" + case)
- shutil.copy(self.suite_path + "/tools/product/stop.sh", self.run_path + "/" + case)
-
- os.chdir(self.run_path)
-
- return True, 'OK'
-
- def on_suite_cleanup(self):
- global setup_path
- os.chdir(setup_path)
- api_log("stopping env..")
-
- return True, 'OK'
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/01_install.c b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/01_install.c
deleted file mode 100644
index 5c7153588..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/01_install.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include "wasm_app.h"
-
-void
-on_init()
-{
- printf("Hello, I was installed.\n");
-}
-
-void
-on_destroy()
-{
- /* real destroy work including killing timer and closing sensor is
- * accomplished in wasm app library version of on_destroy() */
-}
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/02_request.c b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/02_request.c
deleted file mode 100644
index 251de6ff4..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/02_request.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include "wasm_app.h"
-#include "wa-inc/request.h"
-
-void
-res1_handler(request_t *request)
-{
- response_t response[1];
- attr_container_t *payload;
-
- printf("### user resource 1 handler called\n");
-
- printf("###### dump request ######\n");
- printf("sender: %lu\n", request->sender);
- printf("url: %s\n", request->url);
- printf("action: %d\n", request->action);
- printf("payload:\n");
- if (request->payload != NULL && request->payload_len > 0
- && request->fmt == FMT_ATTR_CONTAINER)
- attr_container_dump((attr_container_t *)request->payload);
- printf("#### dump request end ###\n");
-
- payload = attr_container_create("wasm app response payload");
- if (payload == NULL)
- return;
-
- attr_container_set_string(&payload, "key1", "value1");
- attr_container_set_string(&payload, "key2", "value2");
-
- make_response_for_request(request, response);
- set_response(response, CONTENT_2_05, FMT_ATTR_CONTAINER,
- (const char *)payload,
- attr_container_get_serialize_length(payload));
- printf("reciver: %lu, mid:%d\n", response->reciever, response->mid);
- api_response_send(response);
-
- attr_container_destroy(payload);
-}
-
-void
-res2_handler(request_t *request)
-{
- response_t response[1];
- make_response_for_request(request, response);
- set_response(response, DELETED_2_02, 0, NULL, 0);
- api_response_send(response);
-
- printf("### user resource 2 handler called\n");
-}
-
-void
-on_init()
-{
- /* register resource uri */
- api_register_resource_handler("/res1", res1_handler);
- api_register_resource_handler("/res2", res2_handler);
-}
-
-void
-on_destroy()
-{
- /* real destroy work including killing timer and closing sensor is
- * accomplished in wasm app library version of on_destroy() */
-}
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/03_event.c b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/03_event.c
deleted file mode 100644
index 59cfd0097..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/03_event.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include "wasm_app.h"
-#include "wa-inc/timer_wasm_app.h"
-#include "wa-inc/request.h"
-
-int num = 0;
-
-void
-publish_overheat_event()
-{
- attr_container_t *event;
-
- event = attr_container_create("event");
- attr_container_set_string(&event, "warning", "temperature is over high");
-
- printf("###app publish event begin ###\n");
-
- api_publish_event("alert/overheat", FMT_ATTR_CONTAINER, event,
- attr_container_get_serialize_length(event));
-
- printf("###app publish event end ###\n");
-
- attr_container_destroy(event);
-}
-
-/* Timer callback */
-void
-timer1_update(user_timer_t timer)
-{
- printf("Timer update %d\n", num++);
- publish_overheat_event();
-}
-
-void
-start_timer()
-{
- user_timer_t timer;
-
- /* set up a timer */
- timer = api_timer_create(1000, true, false, timer1_update);
- api_timer_restart(timer, 1000);
-}
-
-void
-on_init()
-{
- start_timer();
-}
-
-void
-on_destroy()
-{
- /* real destroy work including killing timer and closing sensor is
- * accomplished in wasm app library version of on_destroy() */
-}
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/04_request_internal_req.c b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/04_request_internal_req.c
deleted file mode 100644
index 99bab9704..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/04_request_internal_req.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include "wasm_app.h"
-#include "wa-inc/request.h"
-
-uint32 mid;
-unsigned long sender;
-
-void
-my_response_handler(response_t *response, void *user_data)
-{
- attr_container_t *payload;
- printf("### user resource 1 handler called\n");
-
- payload = attr_container_create("wasm app response payload");
- if (payload == NULL)
- return;
-
- attr_container_set_string(&payload, "key1", "value1");
- attr_container_set_string(&payload, "key2", "value2");
-
- response->mid = mid;
- response->reciever = sender;
- set_response(response, CONTENT_2_05, FMT_ATTR_CONTAINER,
- (const char *)payload,
- attr_container_get_serialize_length(payload));
- printf("reciver: %lu, mid:%d\n", response->reciever, response->mid);
- api_response_send(response);
-
- attr_container_destroy(payload);
-}
-
-static void
-test_send_request(const char *url, const char *tag)
-{
- request_t request[1];
-
- init_request(request, (char *)url, COAP_PUT, 0, NULL, 0);
- api_send_request(request, my_response_handler, (void *)tag);
-}
-
-void
-res1_handler(request_t *request)
-{
- mid = request->mid;
- sender = request->sender;
- test_send_request("url1", "a general request");
-}
-
-void
-res2_handler(request_t *request)
-{
- mid = request->mid;
- sender = request->sender;
- test_send_request("/app/App1/url1", "a general request");
-}
-
-void
-on_init()
-{
- /* register resource uri */
- api_register_resource_handler("/res1", res1_handler);
- api_register_resource_handler("/res2", res2_handler);
-}
-
-void
-on_destroy()
-{
- /* real destroy work including killing timer and closing sensor is
- * accomplished in wasm app library version of on_destroy() */
-}
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/04_request_internal_resp.c b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/04_request_internal_resp.c
deleted file mode 100644
index 13aecb43a..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/04_request_internal_resp.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include "wasm_app.h"
-#include "wa-inc/request.h"
-
-void
-res1_handler(request_t *request)
-{
- response_t response[1];
- attr_container_t *payload;
-
- printf("[resp] ### user resource 1 handler called\n");
-
- printf("[resp] ###### dump request ######\n");
- printf("[resp] sender: %lu\n", request->sender);
- printf("[resp] url: %s\n", request->url);
- printf("[resp] action: %d\n", request->action);
- printf("[resp] payload:\n");
- if (request->payload != NULL && request->fmt == FMT_ATTR_CONTAINER)
- attr_container_dump((attr_container_t *)request->payload);
- printf("[resp] #### dump request end ###\n");
-
- payload = attr_container_create("wasm app response payload");
- if (payload == NULL)
- return;
-
- attr_container_set_string(&payload, "key1", "value1");
- attr_container_set_string(&payload, "key2", "value2");
-
- make_response_for_request(request, response);
- set_response(response, CONTENT_2_05, FMT_ATTR_CONTAINER,
- (const char *)payload,
- attr_container_get_serialize_length(payload));
- printf("[resp] response payload len %d\n",
- attr_container_get_serialize_length(payload));
- printf("[resp] reciver: %lu, mid:%d\n", response->reciever, response->mid);
- api_response_send(response);
-
- attr_container_destroy(payload);
-}
-
-void
-on_init()
-{
- /* register resource uri */
- api_register_resource_handler("/url1", res1_handler);
-}
-
-void
-on_destroy()
-{
- /* real destroy work including killing timer and closing sensor is
- * accomplished in wasm app library version of on_destroy() */
-}
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/05_event_internal_provider.c b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/05_event_internal_provider.c
deleted file mode 100644
index 59cfd0097..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/05_event_internal_provider.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include "wasm_app.h"
-#include "wa-inc/timer_wasm_app.h"
-#include "wa-inc/request.h"
-
-int num = 0;
-
-void
-publish_overheat_event()
-{
- attr_container_t *event;
-
- event = attr_container_create("event");
- attr_container_set_string(&event, "warning", "temperature is over high");
-
- printf("###app publish event begin ###\n");
-
- api_publish_event("alert/overheat", FMT_ATTR_CONTAINER, event,
- attr_container_get_serialize_length(event));
-
- printf("###app publish event end ###\n");
-
- attr_container_destroy(event);
-}
-
-/* Timer callback */
-void
-timer1_update(user_timer_t timer)
-{
- printf("Timer update %d\n", num++);
- publish_overheat_event();
-}
-
-void
-start_timer()
-{
- user_timer_t timer;
-
- /* set up a timer */
- timer = api_timer_create(1000, true, false, timer1_update);
- api_timer_restart(timer, 1000);
-}
-
-void
-on_init()
-{
- start_timer();
-}
-
-void
-on_destroy()
-{
- /* real destroy work including killing timer and closing sensor is
- * accomplished in wasm app library version of on_destroy() */
-}
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/05_event_internal_subscriber.c b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/05_event_internal_subscriber.c
deleted file mode 100644
index 00e451369..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/05_event_internal_subscriber.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include "wasm_app.h"
-#include "wa-inc/request.h"
-
-uint32 mid;
-unsigned long sender;
-
-void
-over_heat_event_handler(request_t *request)
-{
- response_t response[1];
- attr_container_t *payload;
-
- payload = attr_container_create("wasm app response payload");
- if (payload == NULL)
- return;
-
- attr_container_set_string(&payload, "key1", "value1");
- attr_container_set_string(&payload, "key2", "value2");
-
- response->mid = mid;
- response->reciever = sender;
- set_response(response, CONTENT_2_05, FMT_ATTR_CONTAINER,
- (const char *)payload,
- attr_container_get_serialize_length(payload));
- printf("reciver: %lu, mid:%d\n", response->reciever, response->mid);
- api_response_send(response);
-
- attr_container_destroy(payload);
-}
-
-void
-res1_handler(request_t *request)
-{
- mid = request->mid;
- sender = request->sender;
- api_subscribe_event("alert/overheat", over_heat_event_handler);
-}
-
-void
-on_init()
-{
- /* register resource uri */
- api_register_resource_handler("/res1", res1_handler);
-}
-
-void
-on_destroy()
-{
- /* real destroy work including killing timer and closing sensor is
- * accomplished in wasm app library version of on_destroy() */
-}
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/06_timer.c b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/06_timer.c
deleted file mode 100644
index 6aa107d5c..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/06_timer.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include "wasm_app.h"
-#include "wa-inc/request.h"
-#include "wa-inc/timer_wasm_app.h"
-
-/* User global variable */
-int num = 0;
-
-/* Timer callback */
-void
-timer1_update(user_timer_t timer)
-{
- if (num < 2)
- num++;
-}
-
-void
-res1_handler(request_t *request)
-{
- user_timer_t timer;
-
- /* set up a timer */
- timer = api_timer_create(1000, true, false, timer1_update);
- api_timer_restart(timer, 1000);
-
- response_t response[1];
-
- make_response_for_request(request, response);
-
- set_response(response, CONTENT_2_05, FMT_ATTR_CONTAINER, NULL, 0);
-
- api_response_send(response);
-}
-
-void
-res2_handler(request_t *request)
-{
- response_t response[1];
- attr_container_t *payload;
-
- if (num == 2) {
- attr_container_t *payload;
- printf("### user resource 1 handler called\n");
-
- payload = attr_container_create("wasm app response payload");
- if (payload == NULL)
- return;
-
- attr_container_set_int(&payload, "num", num);
-
- make_response_for_request(request, response);
-
- set_response(response, CONTENT_2_05, FMT_ATTR_CONTAINER,
- (const char *)payload,
- attr_container_get_serialize_length(payload));
- printf("reciver: %lu, mid:%d\n", response->reciever, response->mid);
- api_response_send(response);
-
- attr_container_destroy(payload);
- }
-}
-
-void
-on_init()
-{
- /* register resource uri */
- api_register_resource_handler("/res1", res1_handler);
- api_register_resource_handler("/check_timer", res2_handler);
-}
-
-void
-on_destroy()
-{
- /* real destroy work including killing timer and closing sensor is
- * accomplished in wasm app library version of on_destroy() */
-}
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/07_sensor.c b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/07_sensor.c
deleted file mode 100644
index a6c24a8bc..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/07_sensor.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include "wasm_app.h"
-#include "wa-inc/request.h"
-#include "wa-inc/sensor.h"
-
-uint32 mid;
-unsigned long sender;
-
-/* Sensor event callback*/
-void
-sensor_event_handler(sensor_t sensor, attr_container_t *event, void *user_data)
-{
- printf("### app get sensor event\n");
-
- response_t response[1];
- attr_container_t *payload;
-
- payload = attr_container_create("wasm app response payload");
- if (payload == NULL)
- return;
-
- attr_container_set_string(&payload, "key1", "value1");
- attr_container_set_string(&payload, "key2", "value2");
-
- response->mid = mid;
- response->reciever = sender;
- set_response(response, CONTENT_2_05, FMT_ATTR_CONTAINER,
- (const char *)payload,
- attr_container_get_serialize_length(payload));
- printf("reciver: %lu, mid:%d\n", response->reciever, response->mid);
- api_response_send(response);
-
- attr_container_destroy(payload);
-}
-
-void
-res1_handler(request_t *request)
-{
- mid = request->mid;
- sender = request->sender;
-
- sensor_t sensor;
- char *user_data;
- attr_container_t *config;
-
- printf("### app on_init 1\n");
- /* open a sensor */
- user_data = malloc(100);
- printf("### app on_init 2\n");
- sensor = sensor_open("sensor_test", 0, sensor_event_handler, user_data);
- printf("### app on_init 3\n");
-
- /* config the sensor */
- sensor_config(sensor, 2000, 0, 0);
- printf("### app on_init 4\n");
-}
-
-void
-on_init()
-{
- /* register resource uri */
- api_register_resource_handler("/res1", res1_handler);
-}
-
-void
-on_destroy()
-{
- /* real destroy work including killing timer and closing sensor is
- * accomplished in wasm app library version of on_destroy() */
-}
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/08_on_destroy.c b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/08_on_destroy.c
deleted file mode 100644
index ac05a77da..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/08_on_destroy.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2019 Intel Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include "wasm_app.h"
-#include "wa-inc/request.h"
-#include "wa-inc/sensor.h"
-
-uint32 mid;
-unsigned long sender;
-sensor_t sensor;
-
-/* Sensor event callback*/
-void
-sensor_event_handler(sensor_t sensor, attr_container_t *event, void *user_data)
-{
- printf("### app get sensor event\n");
-
- response_t response[1];
- attr_container_t *payload;
-
- payload = attr_container_create("wasm app response payload");
- if (payload == NULL)
- return;
-
- attr_container_set_string(&payload, "key1", "value1");
-
- response->mid = mid;
- response->reciever = sender;
- set_response(response, CONTENT_2_05, FMT_ATTR_CONTAINER,
- (const char *)payload,
- attr_container_get_serialize_length(payload));
- printf("reciver: %lu, mid:%d\n", response->reciever, response->mid);
- api_response_send(response);
-
- attr_container_destroy(payload);
-}
-
-void
-res1_handler(request_t *request)
-{
- mid = request->mid;
- sender = request->sender;
-
- char *user_data;
- attr_container_t *config;
-
- printf("### app on_init 1\n");
- /* open a sensor */
- user_data = malloc(100);
- printf("### app on_init 2\n");
- sensor = sensor_open("sensor_test", 0, sensor_event_handler, user_data);
- printf("### app on_init 3\n");
-}
-
-void
-on_init()
-{
- /* register resource uri */
- api_register_resource_handler("/res1", res1_handler);
-}
-
-void
-on_destroy()
-{
- if (NULL != sensor) {
- sensor_close(sensor);
- }
-}
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/build.sh b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/build.sh
deleted file mode 100755
index 4b5428051..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/test-app/build.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-
-. ../../../set_dev_env.sh
-
-CC=/opt/wasi-sdk/bin/clang
-APP_DIR=$PWD
-WAMR_DIR=${APP_DIR}/../../../../../
-SDK_DIR=${WAMR_DIR}/wamr-sdk/out/simple-host-interp
-APP_FRAMEWORK_DIR=${SDK_DIR}/app-sdk/wamr-app-framework
-DEPS_DIR=${WAMR_DIR}/core/deps
-
-for i in `ls *.c`
-do
-APP_SRC="$i"
-OUT_FILE=${i%.*}.wasm
-/opt/wasi-sdk/bin/clang -O3 \
- -Wno-int-conversion \
- -I${APP_FRAMEWORK_DIR}/include \
- -I${DEPS_DIR} \
- -O3 -z stack-size=4096 -Wl,--initial-memory=65536 \
- --sysroot=${SDK_DIR}/app-sdk/libc-builtin-sysroot \
- -L${APP_FRAMEWORK_DIR}/lib -lapp_framework \
- -Wl,--allow-undefined-file=${SDK_DIR}/app-sdk/libc-builtin-sysroot/share/defined-symbols.txt \
- -Wl,--strip-all,--no-entry -nostdlib \
- -Wl,--export=on_init -Wl,--export=on_destroy \
- -Wl,--export=on_request -Wl,--export=on_response \
- -Wl,--export=on_sensor_event -Wl,--export=on_timer_callback \
- -Wl,--export=on_connection_data \
- -o ${OUT_FILE} \
- ${APP_SRC}
-if [ -f ${OUT_FILE} ]; then
- echo "build ${OUT_FILE} success"
-else
- echo "build ${OUT_FILE} fail"
-fi
-done
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/tools/product/start.sh b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/tools/product/start.sh
deleted file mode 100755
index f83e39356..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/tools/product/start.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-
-#!/bin/bash
-
-cd $(dirname "$0")
-
-./simple -s > /dev/null 2>&1 &
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/tools/product/stop.sh b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/tools/product/stop.sh
deleted file mode 100755
index b7bc2c8d2..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/01-life-cycle/tools/product/stop.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Copyright (C) 2019 Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-
-#!/bin/bash
-
-ps aux | grep -ie host_tool | awk '{print $2}' | xargs kill -9 &
-ps aux | grep -ie simple | awk '{print $2}' | xargs kill -9 &
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/__init__.py b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/__init__.py
+++ /dev/null
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/readme.txt b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/readme.txt
deleted file mode 100644
index 1e8792f5b..000000000
--- a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/component-test/suites/readme.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-The description of each case in the test suites, should add descriptions in this file when new cases created in the future.
-
-suite 01-life-cycle:
-case 01-install:
- install or uninstall apps for times and query apps to see if the app list is expected.
-case 02-request:
- send request to an app, the app will respond specific attribute objects, host side should get them.
-case 03-event:
- register event to an app, the app will send event back periodically, host side should get some payload.
-case 04-request_internal:
- install 2 apps, host sends request to app2, then app2 sends request to app1, finally app1 respond specific payload to host, host side will check it.
-case 05-event_internal:
- install 2 apps, host sends request to app2, then app2 subscribe app1's event, finally app1 respond specific payload to host, host side will check it.
-case 06-timer:
- host send request to an app, the app then start a timer, when time goes by 2 seconds, app will respond specific payload to host, host side will check it.
-case 07-sensor:
- open sensor in app and then config the sensor in on_init, finally app will respond specific payload to host, host side will check it.
-case 08-on_destroy:
- open sensor in app in on_init, and close the sensor in on_destroy, host should install and uninstall the app successfully.