vscode提示无法在大型工作区监视文件更改的解决方法

嵌入式技术

1343人已加入

描述

vscode提示无法在大型工作区监视文件更改

1.使用以下命令查看当前限制,如果你没改过的话,结果应该是8192

cat /proc/sys/fs/inotify/max_user_watches
----------------------------------------
default is 8192

2.编辑/etc/sysctl.conf

sudo vim /etc/sysctl.conf

3.将以下一行添加到文件末尾,可以将限制增加到最大值

fs.inotify.max_user_watches=524288

4.保存启动生效

sudo sysctl -p

虽然524,288是可以观看的最大文件数,但如果您处于特别受内存限制的环境中,您可能希望降低该数量。每个文件监视占用540字节(32位)或1kB(64位),因此假设所有524,288个句柄都被消耗,上限约为256MB(32位)或512MB(64位)。

具体设置为多大数据,根据实际使用情况而定。

robot命令基本用法

执行指定的测试用例
robot -t “testcase_name“ data_test.robot
执行整个测试套件
robot data_test.robot
robot -s “prjxx.robot.data test" test_directory
执行目录下所有用例
robot test_directory
按执行Tag执行用例
robot --i ClassA test_directory  # 执行指定目录下的全部ClassA测试用例
robot --i ClassA path/test_file.robot  # 执行指定目录下的指定测试套件中的ClassA测试用例
案例
pi@raspberrypi-0-100:~/Downloads/automation/ $ robot -d /home/pi/Downloads/automation/log/ -i ClassA ./Debug/demo.robot 
==============================================================================
Demo                                                                          
==============================================================================
demo01                                                                | PASS |
------------------------------------------------------------------------------
demo03                                                                | PASS |
------------------------------------------------------------------------------
Demo                                                                  | PASS |
2 tests, 2 passed, 0 failed
==============================================================================
Output:  /home/pi/Downloads/automation/log/output.xml
Log:     /home/pi/Downloads/automation/log/log.html
Report:  /home/pi/Downloads/automation/log/report.html


-----------------------------
robot -T -d /home/pi/Downloads/log  # 按照时间戳生成测试报告到指定目录下
-----------------------------
打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分