Announcement

Collapse
No announcement yet.

running a shell script before going into user prompt mode with test-definition.xml

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • running a shell script before going into user prompt mode with test-definition.xml

    Is there a way to execute a shell script before going into user prompt mode which uses the test-definition.xml file? I need to initialize some variables to generate user options in the test-definition.xml file but it needs to occur before going into user prompt mode.

  • #2
    It looks like one can place scripts in /usr/share/phoronix-test-suite/pts-core/hooks/startup to run scripts before the startup of the test profile but how do we have the script run only for one specific test profile instead of having it run for all tests

    Comment


    • #3
      Unfortunately there isn't that support right now. What sort of options do you want generated? There is some built-ins into pts-core where if the test option's name matches some pre-sets, it will auto-populate with either like the available resolutions on the screen, the different mount points, etc. If your script is to do something general system related like that, could add that support to further extend it in pts-core (see like xonotic, fio as a few examples of those existing dynamic options. Otherwise if that doesn't work, if you could share more details would be useful and I could introduce some sort of options.sh file support or something like that but would need more information on what you're trying to achieve.
      Michael Larabel
      http://www.michaellarabel.com/

      Comment


      • #4
        I'm wanting this shell script to retrieve a list of all the drives currently allocated to the system before executing any of the test profile scripts then feed it to the test definition xml to allow the user to select which drives to test with fio. The shell script should only be run if the fio test is selected by the user so do you think that the dynamic option would work for the scenario described? I've looked at the files related to fio and don't anything like that yet

        Comment


        • #5
          Hmm, try looking at the sqlite test then, it should be wired up there at least for mount points. If you look in phoronix-test-suite/pts-core/objects/pts_test_run_options.php, within auto_process_test_option() function you should see auto-disk-partitions, auto-disks, and other existing options that will auto-populate based upon your naming of options, etc. The sqlite test should be a good starting example. Let me know if any other questions.

          Or hdparm test profile is another easy example: http://openbenchmarking.org/innhold/...083cb8e979c506 take note of the auto-disks in the XML there.
          Michael Larabel
          http://www.michaellarabel.com/

          Comment


          • #6
            The hdparm test is definitely a good example - is there a way to allow the user to select either one or more disks rather then the test all option?

            Comment


            • #7
              Originally posted by ionictea View Post
              The hdparm test is definitely a good example - is there a way to allow the user to select either one or more disks rather then the test all option?
              Yes, with any inputs from the list, the user can do say: 1,2,3 if wanting to test the 1st 2nd and 3rd options. Rather than specifying the last one that's for the test all options.
              Michael Larabel
              http://www.michaellarabel.com/

              Comment


              • #8
                It does select the drives but instead of running the concurrently it breaks the tests into two separate runs. I'm wanting to run the tests with whatever drives selected which is supported by fio. Is there a way to capture the feedback from the user arguements and pass it down to the shell script?

                Comment


                • #9
                  I tried a different way via the preset_options method and it seems to work as long as I've defined an argument in install.sh to take the values. Is there a way to feed the auto-disk values during the user prompt menu to the install.sh script so that any 'n' number of drives selected by user gets run concurrent

                  Comment

                  Working...
                  X