diff --git a/doc/source/developer_information/developer_reference/revent.rst b/doc/source/developer_information/developer_reference/revent.rst index 81950ec0..6ff6e268 100644 --- a/doc/source/developer_information/developer_reference/revent.rst +++ b/doc/source/developer_information/developer_reference/revent.rst @@ -5,10 +5,12 @@ Convention for Naming revent Files for Revent Workloads ------------------------------------------------------------------------------- There is a convention for naming revent files which you should follow if you -want to record your own revent files. Each revent file must start with the -device name(case sensitive) then followed by a dot '.' then the stage name -then '.revent'. All your custom revent files should reside at -``'~/.workload_automation/dependencies/WORKLOAD NAME/'``. These are the current +want to record your own revent files. Each revent file must be called (case sensitive) +``..revent``, +where ```` is the name of your device (as defined by the model +name of your device which can be retrieved with +``adb shell getprop ro.product.model`` or by the ``name`` attribute of your +customized device class), and ```` is one of the following currently supported stages: :setup: This stage is where the application is loaded (if present). It is @@ -26,10 +28,12 @@ Only the run stage is mandatory, the remaining stages will be replayed if a recording is present otherwise no actions will be performed for that particular stage. -For instance, to add a custom revent files for a device named "mydevice" and -a workload name "myworkload", you need to add the revent files to the directory -``/home/$WA_USER_HOME/dependencies/myworkload/revent_files`` creating it if -necessary. :: +All your custom revent files should reside at +``'$WA_USER_DIRECTORY/dependencies/WORKLOAD NAME/'``. So +typically to add a custom revent files for a device named "mydevice" and a +workload name "myworkload", you would need to add the revent files to the +directory ``~/.workload_automation/dependencies/myworkload/revent_files`` +creating the directory structure if necessary. :: mydevice.setup.revent mydevice.run.revent diff --git a/doc/source/user_information/how_tos/revent.rst b/doc/source/user_information/how_tos/revent.rst index b3b610d6..6927e748 100644 --- a/doc/source/user_information/how_tos/revent.rst +++ b/doc/source/user_information/how_tos/revent.rst @@ -14,9 +14,9 @@ Using revent with workloads ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Some workloads (pretty much all games) rely on recorded revents for their -execution. ReventWorkloads will require between 1 and 4 revent files be be ran. -There is one mandatory recording ``run`` for performing the actual execution of -the workload and the remaining are optional. ``setup`` can be used to perform +execution. ReventWorkloads require between 1 and 4 revent files to be ran. +There is one mandatory recording, ``run``, for performing the actual execution of +the workload and the remaining stages are optional. ``setup`` can be used to perform the initial setup (navigating menus, selecting game modes, etc). ``extract_results`` can be used to perform any actions after the main stage of the workload for example to navigate a results or summary screen of the app. And @@ -26,17 +26,21 @@ exiting the app. Because revents are very device-specific\ [*]_, these files would need to be recorded for each device. -The files must be called ``.(setup|run|extract_results|teardown).revent`` -, where ```` is the name of your device (as defined by the ``name`` -attribute of your device's class). WA will look for these files in two -places: ``/wa/workloads//revent_files`` -and ``~/.workload_automation/dependencies/``. The first -location is primarily intended for revent files that come with WA (and if +The files must be called ``.(setup|run|extract_results|teardown).revent``, +where ```` is the name of your device (as defined by the model +name of your device which can be retrieved with +``adb shell getprop ro.product.model`` or by the ``name`` attribute of your +customized device class). + +WA will look for these files in two places: +``/wa/workloads//revent_files`` and +``$WA_USER_DIRECTORY/dependencies/``. The +first location is primarily intended for revent files that come with WA (and if you did a system-wide install, you'll need sudo to add files there), so it's -probably easier to use the second location for the files you record. Also, -if revent files for a workload exist in both locations, the files under -``~/.workload_automation/dependencies`` will be used in favour of those -installed with WA. +probably easier to use the second location for the files you record. Also, if +revent files for a workload exist in both locations, the files under +``$WA_USER_DIRECTORY/dependencies`` will be used in favour +of those installed with WA. .. [*] It's not just about screen resolution -- the event codes may be different even if devices use the same screen.