⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_4.py

📁 MANTIS是由科罗拉多大学开发的传感器网络嵌入式操作系统。 这是mantis的0.9.5版本的源码。
💻 PY
字号:
#!/usr/bin/env pythonimport osimport filecmpimport timeimport signalprint "******* Test 4: Clocks *******"os.chdir("../../../../build/mica2/src/tests/automated/test_4")os.system("make")pid = os.fork()if pid == 0:	os.execl('../../../../../../src/tests/automated/LogTest', '', 'test_4')else:	time.sleep(40)	os.kill(pid, signal.SIGKILL)	os.system("grep -v 'LED_OFF' test_4.tmplog > test_4.tmplog2")	os.system("grep -v 'ommand' test_4.tmplog2 > test_4.log")	success = filecmp.cmp('test_4.log', '../../../../../../src/tests/automated/test_4/test_4.ref')	if success == 1:		print "Test 4: Success\n"		os.system("echo 'Test 4: Success' >> ../test.log")	else:		print "Test 4: Failure\n"		os.system("echo 'Test 4: Failure' >> ../test.log")	os.remove("test_4.tmplog")	os.remove("test_4.tmplog2")	time.sleep(4)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -