Update OS examples
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"id": "4d117223-a354-47fb-8b45-62ab1390a95f",
|
||||
"snapshot": "os",
|
||||
"instruction": "Change the permission of all regular files under current directory tree to 644",
|
||||
"source": "NL2Bash",
|
||||
"trajectory": "trajectories/",
|
||||
"config": [
|
||||
{
|
||||
"type": "download",
|
||||
"parameters": {
|
||||
"files": [
|
||||
{
|
||||
"url": "https://drive.usercontent.google.com/download?id=19bEBoYIzwIeTtqSR5Re0XTCN26yXXynn&export=download&authuser=0&confirm=t&uuid=7f9458ab-0e8a-42ff-a10a-eba01f611bc3&at=APZUnTX6GDMmAf-MOSZ58xzrFYS1:1708010153224",
|
||||
"path": "setup.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "execute",
|
||||
"parameters": {
|
||||
"command": "chmod +x setup.sh",
|
||||
"shell": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "execute",
|
||||
"parameters": {
|
||||
"command": "./setup.sh",
|
||||
"shell": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "execute",
|
||||
"parameters": {
|
||||
"command": [
|
||||
"python",
|
||||
"-c",
|
||||
"import pyautogui; import time; pyautogui.click(960, 540); time.sleep(0.5);"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "execute",
|
||||
"parameters": {
|
||||
"command": [
|
||||
"python",
|
||||
"-c",
|
||||
"import pyautogui; import time; pyautogui.hotkey(\"ctrl\", \"alt\", \"t\"); time.sleep(0.5); pyautogui.type(\"cd testDir\"); time.sleep(0.5); pyautogui.press(\"enter\")"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"related_apps": [
|
||||
"os"
|
||||
],
|
||||
"evaluator": {
|
||||
"postconfig": [
|
||||
{
|
||||
"type": "download",
|
||||
"parameters": {
|
||||
"files": [
|
||||
{
|
||||
"url": "https://drive.usercontent.google.com/download?id=1bLx6ZbtNgNySQrgnX9TrUNjD2zM4mOkA&export=download&authuser=0&confirm=t&uuid=5fa3b3df-e281-484f-b8d4-fcdfad210290&at=APZUnTUrg3BZ2zRykZXH-RQzyGUz:1708010154631",
|
||||
"path": "eval.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "execute",
|
||||
"parameters": {
|
||||
"command": "chmod +x eval.sh",
|
||||
"shell": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "check_include_exclude",
|
||||
"result": {
|
||||
"type": "vm_command_line",
|
||||
"command": "bash eval.sh",
|
||||
"shell": true
|
||||
},
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"include": [
|
||||
"All files have the correct permissions."
|
||||
],
|
||||
"exclude": [
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"id": "6f56bf42-85b8-4fbb-8e06-6c44960184ba",
|
||||
"snapshot": "os",
|
||||
"instruction": "Copies file 'file1' to each of directories 'dir1', 'dir2', 'dir3'.",
|
||||
"source": "NL2Bash",
|
||||
"trajectory": "trajectories/",
|
||||
"config": [
|
||||
{
|
||||
"type": "download",
|
||||
"parameters": {
|
||||
"files": [
|
||||
{
|
||||
"url": "https://drive.usercontent.google.com/download?id=1BpFAuuH0IHxpWLDF3jaFNxa9QDe_F12D&export=download&authuser=0&confirm=t&uuid=4f18ddd0-81be-414b-b701-289544cdb321&at=APZUnTXlaYyRw5kPCIK4HezQJVrO:1708051633417",
|
||||
"path": "setup.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "execute",
|
||||
"parameters": {
|
||||
"command": "chmod +x setup.sh",
|
||||
"shell": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "execute",
|
||||
"parameters": {
|
||||
"command": "./setup.sh",
|
||||
"shell": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"related_apps": [
|
||||
"os"
|
||||
],
|
||||
"evaluator": {
|
||||
"postconfig": [
|
||||
{
|
||||
"type": "download",
|
||||
"parameters": {
|
||||
"files": [
|
||||
{
|
||||
"url": "https://drive.usercontent.google.com/download?id=1fQGBoTE40BLoNV_d4KYxbYjKRJdIPDio&export=download&authuser=0&confirm=t&uuid=b380dc07-a88b-4a65-affe-f3a77108d310&at=APZUnTVe08Pyr4RSR94AmQK7S8t_:1708051631877",
|
||||
"path": "eval.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "execute",
|
||||
"parameters": {
|
||||
"command": "chmod +x eval.sh",
|
||||
"shell": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "check_include_exclude",
|
||||
"result": {
|
||||
"type": "vm_command_line",
|
||||
"command": "bash eval.sh",
|
||||
"shell": true
|
||||
},
|
||||
"expected": {
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"include": [
|
||||
"Success: file1 exists in dir1.\nSuccess: file1 exists in dir2.\nSuccess: file1 exists in dir3.\n"
|
||||
],
|
||||
"exclude": [
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user