cth103 / plugin-torture

GNU General Public License v2.0
16 stars 2 forks source link

feature request: add a wrapper script. #2

Closed magnetophon closed 8 years ago

magnetophon commented 9 years ago

I'm developing a wrapper script around plugin-torture, to make possibly unsafe plugins temporarily disappear from the system. It's far from done, but I'd like to know if something like this might be interesting to include:

#!/usr/bin/env zsh
# todo:
# check each plugin in a .so: use the -i option to select the index of ladspa plugins
# make it work propery when some plugins in a set ar OK, and some are not.
# make an option to reset the plugin paths
# include the results of lv2bm: if a plugin has a wide range of cpu-usage: remove it.
# make a version that tests jack programs
#
DATE=`date +%d-%m-%Y---%H-%M-%S`
DIR=~/plugin-torture/$DATE

rm -rf ~/plugin-torture/safeLadspa/ &&
rm -rf ~/plugin-torture/safeLV2/ &&
mkdir -p ~/plugin-torture/safeLadspa &&
mkdir -p ~/plugin-torture/safeLV2 &&
mkdir -p $DIR &&

if [ $LADSPA_PATH != ~/plugin-torture/safeLadspa ]; then
  export OLD_LADSPA_PATH=$LADSPA_PATH
fi

if [ $LV2_PATH != ~/plugin-torture/safeLV2 ]; then
  export OLD_LV2_PATH=$LV2_PATH
fi

for plugins  (${(s.:.)OLD_LADSPA_PATH}/*;) {
  analyseplugin $plugins | grep 'Hard Real-Time'
  if [ $? -eq 0 ]; then
    plugin-torture --evil -d -a --ladspa --plugin $plugins | tee >(>> $DIR/ladspa-evil.txt) | grep 'WARNING'
    if [ $? -eq 1 ]; then
     ln -s $plugins ~/plugin-torture/safeLadspa
    fi
  fi
}

for plugins  (${(s.:.)OLD_LV2_PATH}/*;) {
  if [ -f $plugins/manifest.ttl ]; then
    cat $plugins/*.ttl | grep 'hardRTCapable'
    if [ $? -eq 0 ]; then
      plugin-torture --evil -d -a --lv2 --plugin $plugins/manifest.ttl | tee >(>> $DIR/lv2-evil.txt) | grep 'WARNING'
      if [ $? -eq 1 ]; then
         ln -s $plugins ~/plugin-torture/safeLV2
      fi
    fi
  fi
  }

export LADSPA_PATH=~/plugin-torture/safeLadspa
export LV2_PATH=~/plugin-torture/safeLV2

#open
urxvtc -e $EDITOR $DIR/* &
cth103 commented 9 years ago

Hi, I'm happy to include your script in the repo whenever it is ready :)

magnetophon commented 9 years ago

Cool.

One issue I'm having is that idk how to find out the valid range of the -i option. Giving it a too high number segfaults plugin-torture.

magnetophon commented 9 years ago

updated the script

magnetophon commented 9 years ago

@cth103 I'm not sure about done, but think the script is useful in it's current state.
Does it work for you?

cth103 commented 9 years ago

@magnetophon cool, yes it seems to work fine for me. I've fixed the crash on out-of-range -i options and added your script to the repo. Thanks!

magnetophon commented 9 years ago

Thank YOU! :)

Now how do we test al plugins in a .so?

cth103 commented 9 years ago

Hi Bart,

I will add this when I get the chance ... please remind me if I forget!

Thanks, Carl

On Sat, 30 May 2015 01:25:22 -0700 Bart Brouns notifications@github.com wrote:

Thank YOU! :)

Now how do we test al plugins in a .so?


Reply to this email directly or view it on GitHub: https://github.com/cth103/plugin-torture/issues/2#issuecomment-107008259