RUN_REGRESSIONS 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. You can run your own regressions. This can be incredibly handy for test.
  2. For example, when I've changed something in the kernel and want to test it,
  3. I can put a throwaway print line in the kernel.
  4. Then I cd to ~/nxm, and run this script:
  5. sh ~/jenkinshook.
  6. The script is tailored to my environment and looks like this:
  7. #!/bin/bash
  8. PATH=/home/rminnich/bin:$PATH
  9. set
  10. # The jenkinshook uses this variable.
  11. export JENKINSHOME="/home/rminnich"
  12. # sh -x ./jenkinshook
  13. echo "For debugging errors, we cat the jenkins hook here"
  14. echo "==="
  15. cat jenkinshook
  16. echo "==="
  17. . ./jenkinshook
  18. This does a clean build of everything -- libraries, commands,
  19. kernels -- and then boots the k8regression kernel. If all goes well, you see
  20. a date at the end. If not, you see lots of output. The output
  21. is the diff between sys/src/correctoutput and sys/src/qemuout.
  22. You're also going to need one more file, for the inferno config.
  23. It is called mkconfig.jenkins
  24. It goes in $JENKINSHOME. Mine looks like this:
  25. #
  26. # Set the following 4 variables. The host system is the system where
  27. # the software will be built; the target system is where it will run.
  28. # They are almost always the same.
  29. ROOT=$NXM/inferno-os/
  30. TKSTYLE=std
  31. SYSHOST=Linux # build system OS type (Hp, Inferno, Irix, Linux, MacOSX, Nt, Plan9, Solaris)
  32. SYSTARG=$SYSHOST # target system OS type (Hp, Inferno, Irix, Linux, Nt, Plan9, Solaris)
  33. OBJTYPE=386
  34. OBJDIR=$SYSTARG/$OBJTYPE
  35. <$ROOT/mkfiles/mkhost-$SYSHOST # variables appropriate for host system
  36. <$ROOT/mkfiles/mkfile-$SYSTARG-$OBJTYPE # variables used to build target object type
  37. Just recently, I was testing the new system call stuff.
  38. I put a print in that tested whether the new args matched the args
  39. on the stack.
  40. It did not, and it was really easy to find out this way before trying
  41. to run on real hardware. Going beyond build to a full boot, in the linux
  42. command line, is a real timesaver.