02_build_stress.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. # stress testing with many packages
  3. ./clean.sh
  4. ./01_certs.sh
  5. cp certdevsig ~/.config/syspkg/cert
  6. printf "" >repo.txt
  7. cats=("education" "games" "graphics" "internet" "office" "programming" "tools")
  8. dir=`pwd`
  9. #num=32768
  10. num=1024
  11. for i in `seq 1 $num`
  12. do
  13. mkdir zip zip/bin zip/lib zip/inc
  14. cat >meta$i.json <<EOF
  15. {
  16. "id": "test$i",
  17. "description": [
  18. { "en_US", "Name$i", "Description $i" }
  19. ],
  20. "version": "1.0.1",
  21. "release": "1.0-beta-rc",
  22. "license": "MIT",
  23. "category": "${cats[$[$i%7]]}",
  24. "url": "https://github.com/myuser/test$i/archive/\$VERSION-\$ARCH.zip",
  25. "eula": "https://github.com/myuser/test$i/raw/master/LICENSE",
  26. "homepage": "https://myuser.github.io/test$i",
  27. "bugtracker": "https://github.com/myuser/test$i/issues",
  28. "screenshots": [
  29. "file://$dir/screen.png"
  30. ]
  31. }
  32. EOF
  33. printf "#!/bin/sh\nlorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temport" >zip/bin/test$i
  34. for j in `seq 1 128`
  35. do
  36. echo "$i $j lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temport" >zip/lib/libtest$i.$j.so
  37. echo "$i $j lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temport" >zip/inc/test$i.$j.h
  38. done
  39. echo "Building $i / $num"
  40. ../bin/syspkg build meta$i.json x86_64=zip
  41. rm -rf zip
  42. echo file://$dir/meta$i.json >>repo.txt
  43. done
  44. ../bin/syspkg check meta1.json
  45. ../bin/syspkg check test1-1.0.1-x86_64.zip
  46. sha256sum test1-1.0.1-x86_64.zip
  47. cp certrepo ~/.config/syspkg/cert
  48. ../bin/syspkg build repo.txt index.html