kitsilanosoftware / MonoDevelop.Tizen

MonoDevelop add-in which adds support for developing and deploying LGPLv2-compliant applications using Mono for Tizen
GNU General Public License v3.0
4 stars 0 forks source link

Do not trust the exit code of Tizen SDK tools #17

Open ztzg opened 10 years ago

ztzg commented 10 years ago

Various SDK tools exit with a status of zero even when things go horribly wrong. E.g. a linker error in native-make:

>> /Users/bob/TizenSDK/tizen-sdk/tools/i386-linux-gnueabi-gcc-4.5/bin/../lib/gcc/i386-linux-gnueabi/4.5.4/../../../../i386-linux-gnueabi/bin/ld: cannot find -lmonosgen-2.0
>> collect2: ld returned 1 exit status

is not detected by:

if (p.ExitCode != 0) {
    reporter.AddError (string.Format ("{0} failed with code '{1}'", tool, p.ExitCode));
    return false;
}

We need to explicitly check that the target file has been correctly created and/or updated.